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 22:27:14 +0200
On 16 Jul 2009, at 22:01, Jim Ingham wrote:
On Jul 16, 2009, at 12:28 PM, Jonas Maebe wrote:
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)
Yup, we didn't get time to fix 6873152 for SnowLeopard, but it is on
the docket.
Thanks, glad to hear that.
Note, that bug was only for the dsymutil problem. I didn't see a
bug about the gdb problem.
True, I didn't file a bug about that yet (shame on me).
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)
I didn't see any bugs about this.
I mentioned it in as an aside in 6873152 (referencing rdar://problem/5643496
, but in a quite unclear way I realise now), but you're right that I
should have filed a separate bug about this in any case.
Does gdb read variable's constant value if you don't generate a dSYM
file?
Yes (when using DW_TAG_VARIABLE/AT_const_value; that also works in FSF
gdb). It also works for "local constants" even when using dsymutil
(because it doesn't strip those).
Please file the dsymutil bug anyway, and if gdb ignores the constant
value then please file a gdb bug as well.
Ok.
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