From d1cfc3c7915312aaa3be130bc384698eff4d5c5f Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Mon, 6 Oct 2014 03:36:31 +0000 Subject: [dwarfdump] Print the name for referenced specification of abstract_origin DIEs. Reviewers: dblaikie, samsonov, echristo, aprantl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5466 llvm-svn: 219099 --- llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp') diff --git a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp index 81a976e4da1..6d2e51a64dc 100644 --- a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp +++ b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp @@ -120,6 +120,20 @@ void DWARFDebugInfoEntryMinimal::dumpAttribute(raw_ostream &OS, formValue.dump(OS, u); } + // We have dumped the attribute raw value. For some attributes + // having both the raw value and the pretty-printed value is + // interesting. These attributes are handled below. + if ((attr == DW_AT_specification || attr == DW_AT_abstract_origin) && + // The signature references aren't handled. + formValue.getForm() != DW_FORM_ref_sig8) { + uint32_t Ref = formValue.getAsReference(u).getValue(); + DWARFDebugInfoEntryMinimal DIE; + if (const DWARFUnit *RefU = findUnitAndExtractFast(DIE, u, &Ref)) + if (const char *Ref = DIE.getSubroutineName(RefU, + FunctionNameKind::LinkageName)) + OS << " \"" << Ref << '\"'; + } + OS << ")\n"; } -- cgit v1.2.3