summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-11-17 16:11:28 +0100
committerMark Wielaard <mjw@redhat.com>2009-11-17 16:11:28 +0100
commitb0490786a904cbd19fb04c3d66ac3c277bfc2c71 (patch)
tree81d345f53181fbca6487a0c13a3463635313feaa /dwflpp.cxx
parentf685b2fea262d1e517d75d69c84ec0d1edea6cf0 (diff)
downloadsystemtap-steved-b0490786a904cbd19fb04c3d66ac3c277bfc2c71.tar.gz
systemtap-steved-b0490786a904cbd19fb04c3d66ac3c277bfc2c71.tar.xz
systemtap-steved-b0490786a904cbd19fb04c3d66ac3c277bfc2c71.zip
Use DW_AT_MIPS_linkage_name when available in vardie_from_symtable.
If there is a DW_AT_MIPS_linkage_name it encodes the actual name of the variable as used in the symbol table. * dwflpp.cpp (vardie_from_symtable): Check whether there is a DW_AT_MIPS_linkage_name attribute and use its value if so.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 53f3d8eb..fdbcddf4 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -2215,7 +2215,14 @@ dwflpp::express_as_string (string prelude,
Dwarf_Addr
dwflpp::vardie_from_symtable (Dwarf_Die *vardie, Dwarf_Addr *addr)
{
- const char *name = dwarf_diename (vardie);
+ const char *name;
+ Dwarf_Attribute attr_mem;
+ name = dwarf_formstring (dwarf_attr_integrate (vardie,
+ DW_AT_MIPS_linkage_name,
+ &attr_mem));
+ if (!name)
+ name = dwarf_diename (vardie);
+
if (sess.verbose > 2)
clog << "finding symtable address for " << name << "\n";