This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Debugging with gdb


Ian Lance Taylor wrote:
Russell Shaw <rjshaw@netspace.net.au> writes:

Where do i set gdb in the gcc code so that i can step thru the generation
of rtl output in a high-level kind of way?

RTL is generated in a high-level way in all kinds of places. I don't think there is any particularly good breakpoint to set. For a particular insn, you can sometimes break on gen_INSN, in this case gen_movhi(), which is a generated function appearing in the generated file insn-emit.c.

Gdb can't find the function output_movhi in gcc/config/avr/avr.c. Do i need
to dynamically load something?

No, there is no dynamic loading involved. I don't know why gdb can't find it.

Ian


V.H reminded me gcc is just a driver, which is why i couldn't see any of the functions with nm (should have done nm /usr/local/libexec/gcc/avr/3.4.3/cc1).

Now just need to find where cc1 is called from within in gcc/gcc.c (not really trivial).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]