From: Georg-Johann Lay <avr@gjlay.de>
To: "Vincent R." <forumer@smartmobili.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: compiling gcc in debug
Date: Mon, 06 Apr 2009 14:24:00 -0000 [thread overview]
Message-ID: <49DA1F82.40802@gjlay.de> (raw)
In-Reply-To: <0d45513c31e4d2ea0c6f6e12f209157b@mail.smartmobili.com>
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
prev parent reply other threads:[~2009-04-06 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 14:17 Vincent R.
2009-04-06 14:24 ` Georg-Johann Lay [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49DA1F82.40802@gjlay.de \
--to=avr@gjlay.de \
--cc=forumer@smartmobili.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).