Re: compiling gcc in debug

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

 



Vincent R. schrieb:
Hi,

When debugging gcc, debugger sometimes seems mad because it jumps from one
place to another
maybe due to the fact that some functions are inlined.
How can I build a gcc in debug mode id without -O2 ?

In gcc Makefile I can see that :
CFLAGS_FOR_BUILD = -g -O2
CXXFLAGS_FOR_BUILD = -g -O2
BOOT_CFLAGS= -g -O2

Maybe I need to pass some flags to configure ?


You can use make cc1 CFLAGS='-O0 -g' in gcc directory, resp. for  cc1plus.

It is also helpful to strip the #line notes from the generated C-files (insn-emit.c, insn-recog.c, ...), because these notes confuse the debugger as they point to md.

Georg-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