* FYI: recognize DW_AT_linkage_name
@ 2010-04-20 21:18 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2010-04-20 21:18 UTC (permalink / raw)
To: gdb-patches
DWARF 4 added the equivalent of DW_AT_MIPS_linkage_name, now called
DW_AT_linkage_name. GCC svn will generate this with -gdwarf-4.
This patch adds support for this to GDB.
Built and regtested on x86-64 (compile farm).
Tom
2010-04-20 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (dwarf2_compute_name): Handle DW_AT_linkage_name.
(read_partial_die): Likewise.
(dwarf_attr_name): Likewise.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 724016f..d49b009 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3372,7 +3372,9 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
but we haven't started looking at this enhancement yet. */
struct attribute *attr;
- attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
+ attr = dwarf2_attr (die, DW_AT_linkage_name, cu);
+ if (attr == NULL)
+ attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
if (attr && DW_STRING (attr))
name = DW_STRING (attr);
}
@@ -6844,7 +6846,11 @@ read_partial_die (struct partial_die_info *part_die,
break;
}
break;
+ case DW_AT_linkage_name:
case DW_AT_MIPS_linkage_name:
+ /* Note that both forms of linkage name might appear. We
+ assume they will be the same, and we only store the last
+ one we see. */
if (cu->language == language_ada)
part_die->name = DW_STRING (&attr);
break;
@@ -9633,6 +9639,8 @@ dwarf_attr_name (unsigned attr)
/* DWARF 4 values. */
case DW_AT_signature:
return "DW_AT_signature";
+ case DW_AT_linkage_name:
+ return "DW_AT_linkage_name";
/* SGI/MIPS extensions. */
#ifdef MIPS /* collides with DW_AT_HP_block_index */
case DW_AT_MIPS_fde:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-20 21:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 21:18 FYI: recognize DW_AT_linkage_name Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).