diff options
| author | Frederic Riss <friss@apple.com> | 2014-10-06 03:36:31 +0000 |
|---|---|---|
| committer | Frederic Riss <friss@apple.com> | 2014-10-06 03:36:31 +0000 |
| commit | d1cfc3c7915312aaa3be130bc384698eff4d5c5f (patch) | |
| tree | 824df41507b1056fd47af626ddfe67c7bb9a05ca /llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp | |
| parent | 6005dbd62ec97a25129889b4be148bf8068dc561 (diff) | |
| download | bcm5719-llvm-d1cfc3c7915312aaa3be130bc384698eff4d5c5f.tar.gz bcm5719-llvm-d1cfc3c7915312aaa3be130bc384698eff4d5c5f.zip | |
[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
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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"; } |

