[llvm] ea83e0b - llvm-dwarfdump: Dump address forms in their encoded length rather than always in 64 bits
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 15:49:15 PDT 2020
Author: David Blaikie
Date: 2020-10-04T15:48:57-07:00
New Revision: ea83e0b17ecf5dc0cf228afb334aa72ce9b5aec1
URL: https://github.com/llvm/llvm-project/commit/ea83e0b17ecf5dc0cf228afb334aa72ce9b5aec1
DIFF: https://github.com/llvm/llvm-project/commit/ea83e0b17ecf5dc0cf228afb334aa72ce9b5aec1.diff
LOG: llvm-dwarfdump: Dump address forms in their encoded length rather than always in 64 bits
Few places did this already - refactor them all into a common helper.
Added:
Modified:
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
llvm/test/DebugInfo/MIR/ARM/subregister-full-piece.mir
llvm/test/DebugInfo/MIR/Hexagon/bundled-call-pr44001.mir
llvm/test/DebugInfo/Mips/dbg-call-site-low-pc.ll
llvm/test/DebugInfo/X86/debug-loc-offset.mir
llvm/test/DebugInfo/X86/debug_addr.ll
llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s
llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s
llvm/test/MC/ARM/dwarf-asm-single-section.s
llvm/test/MC/MachO/gen-dwarf.s
llvm/test/MC/WebAssembly/debug-localvar.ll
llvm/test/MC/WebAssembly/dwarfdump.ll
llvm/test/tools/llvm-dwarfdump/X86/gnu_call_site.s
llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
Removed:
################################################################################
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
index 3f1be4e5a592..1342e645934c 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
@@ -82,6 +82,9 @@ class DWARFFormValue {
void dump(raw_ostream &OS, DIDumpOptions DumpOpts = DIDumpOptions()) const;
void dumpSectionedAddress(raw_ostream &OS, DIDumpOptions DumpOpts,
object::SectionedAddress SA) const;
+ void dumpAddress(raw_ostream &OS, uint64_t Address) const;
+ static void dumpAddress(raw_ostream &OS, uint8_t AddressSize,
+ uint64_t Address);
static void dumpAddressSection(const DWARFObject &Obj, raw_ostream &OS,
DIDumpOptions DumpOpts, uint64_t SectionIndex);
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp
index ddf307de2221..25d2e852a7fe 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFAddressRange.cpp
@@ -18,8 +18,9 @@ void DWARFAddressRange::dump(raw_ostream &OS, uint32_t AddressSize,
const DWARFObject *Obj) const {
OS << (DumpOpts.DisplayRawContents ? " " : "[");
- OS << format("0x%*.*" PRIx64 ", ", AddressSize * 2, AddressSize * 2, LowPC)
- << format("0x%*.*" PRIx64, AddressSize * 2, AddressSize * 2, HighPC);
+ DWARFFormValue::dumpAddress(OS, AddressSize, LowPC);
+ OS << ", ";
+ DWARFFormValue::dumpAddress(OS, AddressSize, HighPC);
OS << (DumpOpts.DisplayRawContents ? "" : ")");
if (Obj)
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
index 381dd476cd58..598e3ecee30e 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
@@ -8,6 +8,7 @@
#include "llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h"
#include "llvm/BinaryFormat/Dwarf.h"
+#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
@@ -20,9 +21,11 @@ using namespace llvm;
void DWARFDebugArangeSet::Descriptor::dump(raw_ostream &OS,
uint32_t AddressSize) const {
- OS << format("[0x%*.*" PRIx64 ", ", AddressSize * 2, AddressSize * 2, Address)
- << format(" 0x%*.*" PRIx64 ")", AddressSize * 2, AddressSize * 2,
- getEndAddress());
+ OS << '[';
+ DWARFFormValue::dumpAddress(OS, AddressSize, Address);
+ OS << ", ";
+ DWARFFormValue::dumpAddress(OS, AddressSize, getEndAddress());
+ OS << ')';
}
void DWARFDebugArangeSet::clear() {
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
index a8e7cdeeafbc..cc806739e19e 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
@@ -8,6 +8,7 @@
#include "llvm/DebugInfo/DWARF/DWARFDebugRnglists.h"
#include "llvm/BinaryFormat/Dwarf.h"
+#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
@@ -201,7 +202,7 @@ void RangeListEntry::dump(
CurrentBase = Value0;
if (!DumpOpts.Verbose)
return;
- OS << format(" 0x%*.*" PRIx64, AddrSize * 2, AddrSize * 2, Value0);
+ DWARFFormValue::dumpAddress(OS << ' ', AddrSize, Value0);
break;
}
case dwarf::DW_RLE_base_address:
@@ -209,7 +210,7 @@ void RangeListEntry::dump(
CurrentBase = Value0;
if (!DumpOpts.Verbose)
return;
- OS << format(" 0x%*.*" PRIx64, AddrSize * 2, AddrSize * 2, Value0);
+ DWARFFormValue::dumpAddress(OS << ' ', AddrSize, Value0);
break;
case dwarf::DW_RLE_start_length:
PrintRawEntry(OS, *this, AddrSize, DumpOpts);
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
index 04161e09d3e2..f07f4e362568 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -284,7 +284,7 @@ static void dumpAttribute(raw_ostream &OS, const DWARFDie &Die,
// Print the actual address rather than the offset.
uint64_t LowPC, HighPC, Index;
if (Die.getLowAndHighPC(LowPC, HighPC, Index))
- OS << format("0x%016" PRIx64, HighPC);
+ DWARFFormValue::dumpAddress(OS, U->getAddressByteSize(), HighPC);
else
FormValue.dump(OS, DumpOpts);
}
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
index a7da5acc380b..7a84605211fb 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -358,10 +358,16 @@ bool DWARFFormValue::extractValue(const DWARFDataExtractor &Data,
return !errorToBool(std::move(Err));
}
+void DWARFFormValue::dumpAddress(raw_ostream &OS, uint8_t AddressSize,
+ uint64_t Address) {
+ uint8_t HexDigits = AddressSize * 2;
+ OS << format("0x%*.*" PRIx64, HexDigits, HexDigits, Address);
+}
+
void DWARFFormValue::dumpSectionedAddress(raw_ostream &OS,
DIDumpOptions DumpOpts,
object::SectionedAddress SA) const {
- OS << format("0x%016" PRIx64, SA.Address);
+ dumpAddress(OS, U->getAddressByteSize(), SA.Address);
dumpAddressSection(U->getContext().getDWARFObj(), OS, DumpOpts,
SA.SectionIndex);
}
diff --git a/llvm/test/DebugInfo/MIR/ARM/subregister-full-piece.mir b/llvm/test/DebugInfo/MIR/ARM/subregister-full-piece.mir
index fb201ab523aa..80f34a9f4f37 100644
--- a/llvm/test/DebugInfo/MIR/ARM/subregister-full-piece.mir
+++ b/llvm/test/DebugInfo/MIR/ARM/subregister-full-piece.mir
@@ -13,12 +13,12 @@
# CHECK: DW_AT_stmt_list (0x00000000)
# CHECK: DW_AT_comp_dir ("/")
# CHECK: DW_AT_APPLE_optimized (true)
-# CHECK: DW_AT_low_pc (0x0000000000000000)
-# CHECK: DW_AT_high_pc (0x0000000000000008)
+# CHECK: DW_AT_low_pc (0x00000000)
+# CHECK: DW_AT_high_pc (0x00000008)
# CHECK: DW_TAG_subprogram
-# CHECK: DW_AT_low_pc (0x0000000000000000)
-# CHECK: DW_AT_high_pc (0x0000000000000008)
+# CHECK: DW_AT_low_pc (0x00000000)
+# CHECK: DW_AT_high_pc (0x00000008)
# CHECK: DW_AT_APPLE_omit_frame_ptr (true)
# CHECK: DW_AT_frame_base (DW_OP_reg13 SP)
# CHECK: DW_AT_name ("f")
diff --git a/llvm/test/DebugInfo/MIR/Hexagon/bundled-call-pr44001.mir b/llvm/test/DebugInfo/MIR/Hexagon/bundled-call-pr44001.mir
index 7f362cd550eb..1b2776775fc5 100644
--- a/llvm/test/DebugInfo/MIR/Hexagon/bundled-call-pr44001.mir
+++ b/llvm/test/DebugInfo/MIR/Hexagon/bundled-call-pr44001.mir
@@ -4,7 +4,7 @@
# CHECK-LABEL: DW_TAG_GNU_call_site
# CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x[[BAR_ADDR:[0-9a-f]+]] => {0x{{0*}}[[BAR_ADDR]]} "bar")
-# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000008 ".text")
+# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x00000008 ".text")
--- |
; ModuleID = 'bundled-call-pr44001.ll'
diff --git a/llvm/test/DebugInfo/Mips/dbg-call-site-low-pc.ll b/llvm/test/DebugInfo/Mips/dbg-call-site-low-pc.ll
index 46b1bc6b54ad..abe3ad640f67 100644
--- a/llvm/test/DebugInfo/Mips/dbg-call-site-low-pc.ll
+++ b/llvm/test/DebugInfo/Mips/dbg-call-site-low-pc.ll
@@ -22,7 +22,7 @@
;; Test mips, mipsel, mips64, mips64el:
; CHECK: DW_TAG_GNU_call_site
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "f1"
-; CHECK-NEXT: DW_AT_low_pc (0x0000000000000010)
+; CHECK-NEXT: DW_AT_low_pc (0x{{(00000000)?}}00000010)
; ModuleID = 'm.c'
source_filename = "m.c"
diff --git a/llvm/test/DebugInfo/X86/debug-loc-offset.mir b/llvm/test/DebugInfo/X86/debug-loc-offset.mir
index a6eef5b19625..f9e74d2bed8c 100644
--- a/llvm/test/DebugInfo/X86/debug-loc-offset.mir
+++ b/llvm/test/DebugInfo/X86/debug-loc-offset.mir
@@ -32,7 +32,7 @@
# Checking that we have two compile units with two sets of high/lo_pc.
# CHECK: .debug_info contents
# CHECK: DW_TAG_compile_unit
-# CHECK: DW_AT_low_pc {{.*}} (0x0000000000000020 ".text")
+# CHECK: DW_AT_low_pc {{.*}} (0x00000020 ".text")
# CHECK: DW_AT_high_pc
#
# CHECK: DW_TAG_subprogram
@@ -51,7 +51,7 @@
# CHECK-NOT: DW_AT_location
#
# CHECK: DW_TAG_compile_unit
-# CHECK: DW_AT_low_pc {{.*}} (0x0000000000000000 ".text")
+# CHECK: DW_AT_low_pc {{.*}} (0x00000000 ".text")
# CHECK: DW_AT_high_pc
#
# CHECK: DW_TAG_subprogram
diff --git a/llvm/test/DebugInfo/X86/debug_addr.ll b/llvm/test/DebugInfo/X86/debug_addr.ll
index 1f56e5880167..6087f452c1c4 100644
--- a/llvm/test/DebugInfo/X86/debug_addr.ll
+++ b/llvm/test/DebugInfo/X86/debug_addr.ll
@@ -20,7 +20,7 @@
; DWARF4: DW_AT_GNU_dwo_name{{.*}}test.dwo
; DWARF4: DW_AT_GNU_addr_base{{.*}}0x00000000
; DWARF4: DW_TAG_GNU_call_site
-; DWARF4: DW_AT_low_pc [DW_FORM_GNU_addr_index] (indexed (00000002) address = 0x0000000000000018 ".text")
+; DWARF4: DW_AT_low_pc [DW_FORM_GNU_addr_index] (indexed (00000002) address = 0x00000018 ".text")
; DWARF4: .debug_addr contents:
; DWARF4-NEXT: Addrs: [
; DWARF4-NEXT: 0x00000000
@@ -35,8 +35,8 @@
; DWARF5-NOT: DW_TAG_{{.*}}
; DWARF5: DW_AT_dwo_name{{.*}}test.dwo
; DWARF5: DW_AT_addr_base{{.*}}0x00000008
-; DWARF5: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x0000000000000000 ".text")
-; DWARF5: DW_AT_call_return_pc [DW_FORM_addrx] (indexed (00000002) address = 0x0000000000000018 ".text")
+; DWARF5: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x00000000 ".text")
+; DWARF5: DW_AT_call_return_pc [DW_FORM_addrx] (indexed (00000002) address = 0x00000018 ".text")
; DWARF5: .debug_addr contents:
; DWARF5-NEXT: 0x00000000: Address table header: length = 0x00000010, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00
; DWARF5-NEXT: Addrs: [
diff --git a/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s b/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s
index d73a325a043d..b0ac91609143 100644
--- a/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s
+++ b/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s
@@ -26,8 +26,8 @@ b:
// DWARF: .debug_info contents:
// DWARF: DW_TAG_compile_unit
// DWARF-NOT: DW_TAG_
-// DWARF: DW_AT_low_pc {{.*}}(0x0000000000000000)
-// DWARF: DW_AT_high_pc {{.*}}(0x0000000000000004)
+// DWARF: DW_AT_low_pc {{.*}}(0x00000000)
+// DWARF: DW_AT_high_pc {{.*}}(0x00000004)
// DWARF: DW_TAG_label
// DWARF-NEXT: DW_AT_name {{.*}}("a")
diff --git a/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s b/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s
index 04fed305040d..9d1abbf05d7e 100644
--- a/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s
+++ b/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s
@@ -20,8 +20,8 @@ b:
// DWARF: .debug_info contents:
// DWARF: DW_TAG_compile_unit
// DWARF-NOT: DW_TAG_
-// DWARF: DW_AT_low_pc (0x0000000000000000)
-// DWARF: DW_AT_high_pc (0x0000000000000004)
+// DWARF: DW_AT_low_pc (0x00000000)
+// DWARF: DW_AT_high_pc (0x00000004)
// DWARF: DW_TAG_label
// DWARF-NEXT: DW_AT_name ("b")
diff --git a/llvm/test/MC/ARM/dwarf-asm-single-section.s b/llvm/test/MC/ARM/dwarf-asm-single-section.s
index 9ee80a2770a9..781319ffaa00 100644
--- a/llvm/test/MC/ARM/dwarf-asm-single-section.s
+++ b/llvm/test/MC/ARM/dwarf-asm-single-section.s
@@ -21,8 +21,8 @@ a:
// DWARF: .debug_info contents:
// DWARF: DW_TAG_compile_unit
// DWARF-NOT: DW_TAG_
-// DWARF: DW_AT_low_pc (0x0000000000000000)
-// DWARF: DW_AT_high_pc (0x0000000000000004)
+// DWARF: DW_AT_low_pc (0x00000000)
+// DWARF: DW_AT_high_pc (0x00000004)
// DWARF: DW_TAG_label
// DWARF-NEXT: DW_AT_name ("a")
diff --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s
index 62dd18a59acb..a4b979aa1bd5 100644
--- a/llvm/test/MC/MachO/gen-dwarf.s
+++ b/llvm/test/MC/MachO/gen-dwarf.s
@@ -37,8 +37,8 @@ _x: .long 1
// We don't check the leading addresses these are at.
// CHECK: DW_TAG_compile_unit
// CHECK: DW_AT_stmt_list (0x00000000)
-// CHECK: DW_AT_low_pc (0x0000000000000000)
-// CHECK: DW_AT_high_pc (0x0000000000000008)
+// CHECK: DW_AT_low_pc (0x00000000)
+// CHECK: DW_AT_high_pc (0x00000008)
// We don't check the file name as it is a temp directory
// CHECK: DW_AT_name
// We don't check the DW_AT_comp_dir which is the current working directory
@@ -49,19 +49,19 @@ _x: .long 1
// CHECK: DW_AT_name ("bar")
// CHECK: DW_AT_decl_file ([[FILE:".*gen-dwarf.s"]])
// CHECK: DW_AT_decl_line (5)
-// CHECK: DW_AT_low_pc (0x0000000000000000)
+// CHECK: DW_AT_low_pc (0x00000000)
// CHECK: DW_TAG_label
// CHECK: DW_AT_name ("foo")
// CHECK: DW_AT_decl_file ([[FILE]])
// CHECK: DW_AT_decl_line (9)
-// CHECK: DW_AT_low_pc (0x0000000000000007)
+// CHECK: DW_AT_low_pc (0x00000007)
// CHECK: DW_TAG_label
// CHECK: DW_AT_name ("baz")
// CHECK: DW_AT_decl_file ([[FILE]])
// CHECK: DW_AT_decl_line (10)
-// CHECK: DW_AT_low_pc (0x0000000000000007)
+// CHECK: DW_AT_low_pc (0x00000007)
// CHECK: NULL
diff --git a/llvm/test/MC/WebAssembly/debug-localvar.ll b/llvm/test/MC/WebAssembly/debug-localvar.ll
index ffb04e4387d0..46dd42ea97a8 100644
--- a/llvm/test/MC/WebAssembly/debug-localvar.ll
+++ b/llvm/test/MC/WebAssembly/debug-localvar.ll
@@ -78,8 +78,8 @@ attributes #2 = { nounwind }
; CHECK-LABEL: DW_TAG_compile_unit
; CHECK-LABEL: DW_TAG_subprogram
-; CHECK-NEXT: DW_AT_low_pc (0x0000000000000002)
-; CHECK-NEXT: DW_AT_high_pc (0x0000000000000039)
+; CHECK-NEXT: DW_AT_low_pc (0x00000002)
+; CHECK-NEXT: DW_AT_high_pc (0x00000039)
; CHECK-NEXT: DW_AT_frame_base (DW_OP_WASM_location 0x0 0x1, DW_OP_stack_value)
; CHECK-NEXT: DW_AT_name ("foo")
; CHECK-NEXT: DW_AT_decl_file ("/s/llvm-upstream{{(/|\\)}}debugtest.c")
@@ -102,8 +102,8 @@ attributes #2 = { nounwind }
; CHECK-NEXT: DW_AT_type (0x00000073 "int")
; CHECK-LABEL: DW_TAG_lexical_block
-; CHECK-NEXT: DW_AT_low_pc (0x000000000000001c)
-; CHECK-NEXT: DW_AT_high_pc (0x000000000000002d)
+; CHECK-NEXT: DW_AT_low_pc (0x0000001c)
+; CHECK-NEXT: DW_AT_high_pc (0x0000002d)
; CHECK-LABEL: DW_TAG_variable
; CHECK-NEXT: DW_AT_location (DW_OP_fbreg +4)
diff --git a/llvm/test/MC/WebAssembly/dwarfdump.ll b/llvm/test/MC/WebAssembly/dwarfdump.ll
index e6b3f15ba414..6a53cdd724a2 100644
--- a/llvm/test/MC/WebAssembly/dwarfdump.ll
+++ b/llvm/test/MC/WebAssembly/dwarfdump.ll
@@ -10,8 +10,8 @@
; CHECK-NEXT: DW_AT_stmt_list (0x00000000)
; CHECK-NEXT: DW_AT_comp_dir ("/usr/local/google/home/sbc/dev/wasm/simple")
; CHECK-NEXT: DW_AT_GNU_pubnames (true)
-; CHECK-NEXT: DW_AT_low_pc (0x0000000000000002)
-; CHECK-NEXT: DW_AT_high_pc (0x0000000000000004)
+; CHECK-NEXT: DW_AT_low_pc (0x00000002)
+; CHECK-NEXT: DW_AT_high_pc (0x00000004)
; CHECK: 0x00000026: DW_TAG_variable
; CHECK-NEXT: DW_AT_name ("foo")
@@ -44,8 +44,8 @@
; CHECK-NEXT: DW_AT_prototyped (true)
; CHECK: 0x0000005a: DW_TAG_subprogram
-; CHECK-NEXT: DW_AT_low_pc (0x0000000000000002)
-; CHECK-NEXT: DW_AT_high_pc (0x0000000000000004)
+; CHECK-NEXT: DW_AT_low_pc (0x00000002)
+; CHECK-NEXT: DW_AT_high_pc (0x00000004)
; CHECK-NEXT: DW_AT_frame_base (DW_OP_WASM_location 0x3 0x0, DW_OP_stack_value)
; CHECK-NEXT: DW_AT_name ("f2")
; CHECK-NEXT: DW_AT_decl_file ("/usr/local/google/home/sbc/dev/wasm/simple{{[/\\]}}test.c")
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/gnu_call_site.s b/llvm/test/tools/llvm-dwarfdump/X86/gnu_call_site.s
index 8a0b1f5e3a87..d4ae1d96c1fd 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/gnu_call_site.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/gnu_call_site.s
@@ -5,13 +5,13 @@
# CHECK-NEXT: DW_AT_external (true)
# CHECK-NEXT: DW_AT_name ("fn4")
# CHECK-NEXT: DW_AT_linkage_name ("test")
-# CHECK-NEXT: DW_AT_low_pc (0x0000000000000000)
-# CHECK-NEXT: DW_AT_high_pc (0x0000000000000000)
+# CHECK-NEXT: DW_AT_low_pc (0x00000000)
+# CHECK-NEXT: DW_AT_high_pc (0x00000000)
# CHECK-NEXT: DW_AT_frame_base (DW_OP_call_frame_cfa)
# CHECK-NEXT: DW_AT_GNU_all_call_sites (true)
# CHECK: DW_TAG_GNU_call_site
-# CHECK-NEXT: DW_AT_low_pc (0x0000000000000000)
+# CHECK-NEXT: DW_AT_low_pc (0x00000000)
# CHECK-NEXT: DW_AT_abstract_origin (0x00000021 "test")
# CHECK: DW_TAG_GNU_call_site_parameter
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s b/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
index 85a88fc54d89..e8627f31e9f8 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/tombstone.s
@@ -13,11 +13,10 @@
# CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
# CHECK-NEXT: [0x00000042, 0x00000048))
# CHECK: DW_TAG_subprogram
-# FIXME: Print address using unit's address size.
-# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x00000000ffffffff (dead code))
+# CHECK: DW_AT_low_pc [DW_FORM_addr] (0xffffffff (dead code))
# CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000006)
# CHECK: DW_TAG_subprogram
-# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000042)
+# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x00000042)
# CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000006)
# CHECK: DW_TAG_compile_unit
# CHECK: DW_AT_addr_base
@@ -28,10 +27,10 @@
# CHECK-NEXT: [0x00000042, 0x00000048)
# CHECK-NEXT: [0x00000042, 0x00000048))
# CHECK: DW_TAG_subprogram
-# CHECK: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x00000000ffffffff (dead code))
+# CHECK: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0xffffffff (dead code))
# CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000006)
# CHECK: DW_TAG_subprogram
-# CHECK: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000001) address = 0x0000000000000042)
+# CHECK: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000001) address = 0x00000042)
# CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000006)
# CHECK: DW_TAG_compile_unit
# CHECK: DW_AT_ranges [DW_FORM_sec_offset] (0x00000018
More information about the llvm-commits
mailing list