[RFA 2/4] dwarf2_physname

Keith Seitz keiths@redhat.com
Fri Feb 5 23:10:00 GMT 2010


On 02/05/2010 12:57 PM, Daniel Jacobowitz wrote:
> (Things I'm wondering about that we can sort out later: namespace X {
> int f() { extern int y; } }, does y go in a namespace?  What
> namespace?  It certainly doesn't go in X::f()::y but I don't know what
> GCC emits.

I would expect some DIE to contain a DW_AT_specification that refers to 
the real y, and that we use that to determine what to do.

The only testcase I could come up with your example was with "y" defined 
inside X, and the debuginfo behave as above. I cannot seem to get gcc to 
resolve "y" to anything but X::y, but then I'm no expert on namespaces & 
extern. Not even a novice.

> namespace X { class Y { static int x; } }, is that DW_AT_extern?)

Yes, it is DW_AT_external.

Keith



More information about the Gdb-patches mailing list