public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compiling gcc in debug
@ 2009-04-06 14:17 Vincent R.
  2009-04-06 14:24 ` Georg-Johann Lay
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent R. @ 2009-04-06 14:17 UTC (permalink / raw)
  To: gcc-help

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 ?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: compiling gcc in debug
  2009-04-06 14:17 compiling gcc in debug Vincent R.
@ 2009-04-06 14:24 ` Georg-Johann Lay
  0 siblings, 0 replies; 2+ messages in thread
From: Georg-Johann Lay @ 2009-04-06 14:24 UTC (permalink / raw)
  To: Vincent R.; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-06 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 14:17 compiling gcc in debug Vincent R.
2009-04-06 14:24 ` Georg-Johann Lay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).