From: Paul Koning <pkoning@equallogic.com>
To: drow@false.org
Cc: gdb@sources.redhat.com
Subject: Re: preprocessor support?
Date: Fri, 28 May 2004 19:35:00 -0000 [thread overview]
Message-ID: <16567.38040.594168.509373@gargle.gargle.HOWL> (raw)
In-Reply-To: <20040528192945.GA4018@nevyn.them.org>
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
Daniel> On Fri, May 28, 2004 at 03:24:19PM -0400, Paul Koning wrote:
>> These days GCC will output dwarf2 debug sections listing
>> preprocessor symbol definitions, but gdb 6.1 doesn't seem to look
>> at that (at least not for mips-netbsd).
>>
>> Is that not implemented yet? Is it in some targets but not this
>> one (and if so, any pointers to places I might look to teach this
>> target a new trick)?
Daniel> It should work everywhere, so you'll have to dig at it
Daniel> harder. I'm not sure that it's tested; there's at least one
Daniel> test in the testsuite but I don't see it going out of its way
Daniel> to pass -g3, so the binary won't have macro information.
To be more specific:
I looked at the .S file coming out of gcc, and saw the macro debug
data.
I then linked the executable file, did an objdump on that, and again
saw the macros in the debug data (.debug_macinfo section).
I then fed the executable to gdb, and asked it to print me the value
of a couple of preprocessor symbols, like TEST which I defined and
__GNUC__ which gcc put in. Gdb said:
No symbol "__GNUC__" in current context.
Do I need to speak a magic word to have gdb look for the macro
symbols?
paul
next prev parent reply other threads:[~2004-05-28 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-28 19:24 Paul Koning
2004-05-28 19:29 ` Daniel Jacobowitz
2004-05-28 19:35 ` Paul Koning [this message]
2004-06-01 1:43 ` Daniel Jacobowitz
2004-06-01 14:49 ` Paul Koning
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=16567.38040.594168.509373@gargle.gargle.HOWL \
--to=pkoning@equallogic.com \
--cc=drow@false.org \
--cc=gdb@sources.redhat.com \
/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