This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Debugging a port
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Russell Shaw <rjshaw at netspace dot net dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 7 Dec 2004 17:57:14 +0100
- Subject: Re: Debugging a port
- References: <41B5D3C0.5040508@netspace.net.au>
> Dumps at various compilation phases can be done with the -d switch,
> but i was wondering if a more interactive approach could be used
> with gdb. Where is a good place to put gdb breakpoints in the gcc
> source? What other useful methods of debugging in gcc are there?
For the 3.x series of compilers, stopping in emit-rtl.c:make_insn_raw,
make_jump_insn_raw and make_call_insn_raw is very useful. Of course you
don't want to stop on every insn, so conditionalizing on the insn index
number (cur_insn_uid, which is actually cfun->emit->x_cur_insn_uid) might
help too.
--
Eric Botcazou