This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
constructors and DW_AT_MIPS_linkage_name
- From: David Carlton <carlton at kealia dot com>
- To: gdb <gdb at sources dot redhat dot com>
- Cc: Daniel Jacobowitz <drow at mvista dot com>
- Date: Fri, 13 Feb 2004 09:59:30 -0800
- Subject: constructors and DW_AT_MIPS_linkage_name
I was just looking at the .debug_info for the example given in PR
1553, and I was surprised to see the following (some bits have been
deleted)
.uleb128 0x2 # (DIE (0x25) DW_TAG_structure_type)
.long 0x7b # DW_AT_sibling
.ascii "A\0" # DW_AT_name
.byte 0x1 # DW_AT_byte_size
.uleb128 0x4 # (DIE (0x37) DW_TAG_subprogram)
.long 0x57 # DW_AT_sibling
.byte 0x1 # DW_AT_external
.long .LC0 # DW_AT_name: "operator="
.long .LC1 # DW_AT_MIPS_linkage_name: "_ZN1AaSERKS_"
.long 0x7b # DW_AT_type
.byte 0x1 # DW_AT_artificial
.byte 0x1 # DW_AT_declaration
.byte 0x0 # end of children of DIE 0x37
.uleb128 0x7 # (DIE (0x57) DW_TAG_subprogram)
.long 0x6d # DW_AT_sibling
.byte 0x1 # DW_AT_external
.ascii "A\0" # DW_AT_name
.byte 0x1 # DW_AT_artificial
.byte 0x1 # DW_AT_declaration
.byte 0x0 # end of children of DIE 0x57
.uleb128 0x8 # (DIE (0x6d) DW_TAG_subprogram)
.byte 0x1 # DW_AT_external
.ascii "A\0" # DW_AT_name
.byte 0x1 # DW_AT_artificial
.byte 0x1 # DW_AT_declaration
.byte 0x0 # end of children of DIE 0x6d
.byte 0x0 # end of children of DIE 0x25
The weird thing is that operator= gets a linkage name, but the
constructors don't. I don't think we're prepared to deal with this;
it would explain some weirdnesses that I've seen elsewhere, where
trying to look up a class returns that class's constructor instead.
Is this a known GCC issue? (The above is with GCC 3.2; for GCC
mainline, the debug info for A isn't there at all, but that's a
separate issue.) If so, in what circumstances does it occur?
David Carlton
carlton@kealia.com