[llvm] 628a319 - llvm-dwarfdump: Print addresses in debug_line to the parsed address size
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 16:06:32 PDT 2020
Author: David Blaikie
Date: 2020-10-04T16:05:49-07:00
New Revision: 628a319475dceac307add6953df028ec372e7f4e
URL: https://github.com/llvm/llvm-project/commit/628a319475dceac307add6953df028ec372e7f4e
DIFF: https://github.com/llvm/llvm-project/commit/628a319475dceac307add6953df028ec372e7f4e.diff
LOG: llvm-dwarfdump: Print addresses in debug_line to the parsed address size
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index ab3022955cdb..bda41b1f34e9 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -897,8 +897,11 @@ Error DWARFDebugLine::LineTable::parse(
TableData.setAddressSize(ExtractorAddressSize);
}
- if (Cursor && Verbose)
- *OS << format(" (0x%16.16" PRIx64 ")", State.Row.Address.Address);
+ if (Cursor && Verbose) {
+ *OS << " (";
+ DWARFFormValue::dumpAddress(*OS, OpcodeAddressSize, State.Row.Address.Address);
+ *OS << ')';
+ }
}
break;
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s b/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
index e8627f31e9f8..cb2a3a9d798d 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
@@ -64,12 +64,11 @@
# CHECK-DAG: .debug_line contents:
# CHECK: Address Line
# CHECK-NEXT: --------------
-# FIXME: Dump the address with a size-appropriate encoding
-# CHECK-NEXT: DW_LNE_set_address (0x00000000ffffffff)
+# CHECK-NEXT: DW_LNE_set_address (0xffffffff)
# CHECK-NEXT: DW_LNS_copy
# CHECK-NEXT: DW_LNS_advance_pc (1)
# CHECK-NEXT: DW_LNE_end_sequence
-# CHECK-NEXT: DW_LNE_set_address (0x0000000000000042)
+# CHECK-NEXT: DW_LNE_set_address (0x00000042)
# CHECK-NEXT: DW_LNS_copy
# CHECK-NEXT: 0x0000000000000042 1
# CHECK-NEXT: DW_LNS_advance_pc (1)
More information about the llvm-commits
mailing list