[Dwarf-Discuss] pubnames

Nettleton, Brian brian.nettleton@windriver.com
Tue Feb 3 19:49:54 GMT 2009

> -----Original Message-----
> From: dwarf-discuss-bounces at lists.dwarfstd.org 
> [mailto:dwarf-discuss-bounces at lists.dwarfstd.org] On Behalf 
> Of Andrew Cagney
> Sent: Tuesday, February 03, 2009 10:19 AM
> To: Tom Tromey
> Cc: DWARF Discussion
> Subject: Re: [Dwarf-Discuss] pubnames
> Can you give an example of how enums in .debug_pubnames would be used?
> I tried to work through several scenarios:
> - given something like:
>     print a::name
> since we can't assume it is fully qualified (and use 
> .debug_pubnames as a cheat) we must first resolve it using 
> the current context's .debug_info; in the case of an enum the 
> .debug_info's name/scope information will yield the enum's 
> value eliminating any reason to refer to .debug_pubnames.

A continuation of this is to support where the name is a fully qualified
name but not available in the current context.  It's common for a
debugger to add an additional "global context" above and beyond the
outermost scope of the compiler.  So if the name isn't found in the
current context, then searching .debug_pubnames in this global context
makes sense.  Debuggers usually really do have this extra outer context
beyond the context described in the .debug_info.

-Brian Nettleton

More information about the Dwarf-discuss mailing list