C Preprocessor Macro expansion in GDB
C Preprocessor Macro expansion in GDB
- Subject: C Preprocessor Macro expansion in GDB
- From: James Widman <email@hidden>
- Date: Thu, 19 Jan 2006 18:26:51 -0500
Hi all,
I'm interested in using preprocessor macros in expressions in GDB
sessions, but I can't seem to get it to work. I followed the example
given here:
http://developer.apple.com/documentation/DeveloperTools/gdb/gdb/
gdb_10.html
As specified in the documentation, I compiled like so (using GCC
4.0.1, bundled with Xcode 2.2.1):
gcc -gdwarf-2 -g3 sample.c -o sample
But when I got to the point in the example where it instructs you to
issue the GDB command:
info macro ADD
... I received only this message:
GDB has no preprocessor macro information for that code.
Now, I haven't yet found the Mach-O equivalent of:
readelf --debug-dump=macro sample
... but when I load the binary file 'sample' into a text editor, I
can see a region where all of the macro definitions are stored. So
it kind of looks like GCC did its part to generate debug symbols for
macros, but GDB decided not to load them in.
Is macro expansion supported in Apple's version of GDB? If so, how
can I coax it into performing its documented behavior?
Thanks in advance,
James
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden