summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-12-24 06:52:31 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-12-24 06:52:31 +0000
commitb917c3a41a8dc3648a6a9f7c24b9483ce6e3b9bf (patch)
treec3c1ab469b2c4be56b4dce794e0ef6a94be8b77e /llvm/lib/DebugInfo
parent347c583772911bbed130628fab25541f8931bf31 (diff)
downloadbcm5719-llvm-b917c3a41a8dc3648a6a9f7c24b9483ce6e3b9bf.tar.gz
bcm5719-llvm-b917c3a41a8dc3648a6a9f7c24b9483ce6e3b9bf.zip
llvm-dwarfdump: Skip address index info (and dump only the address, if found) when non-verbose dumping addrx forms
There's a few bugs here still - demonstrated with FIXITs in the test. llvm-svn: 350046
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
index b7b359878f9..7719fea6312 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -370,13 +370,14 @@ void DWARFFormValue::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const {
case DW_FORM_addrx3:
case DW_FORM_addrx4:
case DW_FORM_GNU_addr_index: {
- AddrOS << format("indexed (%8.8x) address = ", (uint32_t)UValue);
+ Optional<SectionedAddress> A = U->getAddrOffsetSectionItem(UValue);
+ if (!A || DumpOpts.Verbose)
+ AddrOS << format("indexed (%8.8x) address = ", (uint32_t)UValue);
if (U == nullptr)
OS << "<invalid dwarf unit>";
- else if (Optional<SectionedAddress> A =
- U->getAddrOffsetSectionItem(UValue)) {
+ else if (A)
dumpSectionedAddress(AddrOS, DumpOpts, *A);
- } else
+ else
OS << "<no .debug_addr section>";
break;
}
OpenPOWER on IntegriCloud