This is the mail archive of the gcc-help@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 internal compiler errors ...


kevin diggs schrieb:
Hi,

Sorry. This is a little better (added -g to CFLAGS on build command):

It might be helpful to add -O0 as well, at least for modules you are interested in like so:


where-cc1-is-located> rm expr.o; make cc1 CFLAGS='-g -O0'

To start the debugger I use ddd which gives a minimum of GUI. Anyway, it's helpful to start gdb from the right directory like

where-cc1-is-located> ddd cc1
gdb> set args "command line args to cc1"
gdb> cd "dir where call took place resp. where .i is located"
gdb> ...

Also read the helpful extensions described in gcc/gdbinit.in This already sets breakpoints at internal_error, fancy_abort, exit and abort.

Johann




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