• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: GDB & static const variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB & static const variables


  • Subject: Re: GDB & static const variables
  • From: Jim Ingham <email@hidden>
  • Date: Thu, 16 Jul 2009 13:01:22 -0700


On Jul 16, 2009, at 12:28 PM, Jonas Maebe wrote:


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)

Yup, we didn't get time to fix 6873152 for SnowLeopard, but it is on the docket. Note, that bug was only for the dsymutil problem. I didn't see a bug about the gdb problem.


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. Does gdb read variable's constant value if you don't generate a dSYM file? Please file the dsymutil bug anyway, and if gdb ignores the constant value then please file a gdb bug as well.


Thanks,

Jim



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
  • Follow-Ups:
    • Re: GDB & static const variables
      • From: Jonas Maebe <email@hidden>
References: 
 >GDB & static const variables (From: Eric Gorr <email@hidden>)
 >Re: GDB & static const variables (From: Fritz Anderson <email@hidden>)
 >Re: GDB & static const variables (From: Eric Gorr <email@hidden>)
 >Re: GDB & static const variables (From: Jim Ingham <email@hidden>)
 >Re: GDB & static const variables (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: GDB & static const variables
  • Next by Date: Re: GDB & static const variables
  • Previous by thread: Re: GDB & static const variables
  • Next by thread: Re: GDB & static const variables
  • Index(es):
    • Date
    • Thread