Re: debugging internal compiler errors ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux