Re: GDB & static const variables
Re: GDB & static const variables
- Subject: Re: GDB & static const variables
- From: Jonas Maebe <email@hidden>
- Date: Thu, 16 Jul 2009 21:28:24 +0200
On 16 Jul 2009, at 21:04, Jim Ingham wrote:
That's arguably a bug in the compiler. Even if the compiler chooses
to optimize the name to a constant, it can still record that fact in
the debug information. At -O0 particularly, the compiler is
supposed to preserve as much information as it can to make the
debugging experience faithful to your source code.
I have been unsuccessful in adding constant information to DWARF-2
debug information for our compiler on Mac OS X. The reasons are:
a) DW_TAG_CONSTANT entries appear to be ignored by gdb, and moreover
dsymutil discards them (rdar://problem/6873152)
b) a global DW_TAG_VARIABLE in combination with an AT_const_value is
also stripped by dsymutl (because there is no N_GSYM entry for it in
the debug map, since such constants do not correspond to a memory
location and hence it's not possible to associate them with a symbol
for which the linker can add a debug map entry)
Jonas
_______________________________________________
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