• 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: 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
  • Follow-Ups:
    • Re: GDB & static const variables
      • From: Jim Ingham <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>)

  • 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