From 25179613f67ddf037ab378a3966187d1d986fa92 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 22 Dec 2018 20:34:58 +0000 Subject: [PATCH] llvm-dwarfdump: Dump the section name/number for addr attributes llvm-svn: 350009 --- llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp | 2 +- llvm/test/DebugInfo/AArch64/dwarfdump.ll | 4 ++-- llvm/test/DebugInfo/SystemZ/variable-loc.s | 4 ++-- llvm/test/DebugInfo/X86/debug-loc-offset.mir | 4 ++-- llvm/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s | 2 +- llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp index 241f9a70603c..b7b359878f96 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp @@ -362,7 +362,7 @@ void DWARFFormValue::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const { : nulls(); switch (Form) { case DW_FORM_addr: - AddrOS << format("0x%016" PRIx64, UValue); + dumpSectionedAddress(AddrOS, DumpOpts, {Value.uval, Value.SectionIndex}); break; case DW_FORM_addrx: case DW_FORM_addrx1: diff --git a/llvm/test/DebugInfo/AArch64/dwarfdump.ll b/llvm/test/DebugInfo/AArch64/dwarfdump.ll index 6ce5f0234457..956b10d64ab4 100644 --- a/llvm/test/DebugInfo/AArch64/dwarfdump.ll +++ b/llvm/test/DebugInfo/AArch64/dwarfdump.ll @@ -14,9 +14,9 @@ ; A couple of ABS64s similarly: -; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) +; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text") ; CHECK-4: DW_AT_high_pc [DW_FORM_data4] (0x00000008) -; CHECK-3: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008) +; CHECK-3: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008 ".text") define i32 @main() nounwind !dbg !3 { ret i32 0, !dbg !8 diff --git a/llvm/test/DebugInfo/SystemZ/variable-loc.s b/llvm/test/DebugInfo/SystemZ/variable-loc.s index 6940b1be4d78..8e2a59287f78 100644 --- a/llvm/test/DebugInfo/SystemZ/variable-loc.s +++ b/llvm/test/DebugInfo/SystemZ/variable-loc.s @@ -11,8 +11,8 @@ # # A couple of R_390_64s similarly: # -# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) -# CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000050) +# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text") +# CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000050 ".text") .file "test/DebugInfo/SystemZ/variable-loc.ll" diff --git a/llvm/test/DebugInfo/X86/debug-loc-offset.mir b/llvm/test/DebugInfo/X86/debug-loc-offset.mir index c5f80d062970..07b7972ec1a2 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) +# CHECK: DW_AT_low_pc {{.*}} (0x0000000000000020 ".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) +# CHECK: DW_AT_low_pc {{.*}} (0x0000000000000000 ".text") # CHECK: DW_AT_high_pc # # CHECK: DW_TAG_subprogram diff --git a/llvm/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s b/llvm/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s index 25ea30d737cc..7d5a6f938bd4 100644 --- a/llvm/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s +++ b/llvm/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s @@ -4,7 +4,7 @@ # CHECK: .debug_info contents: # CHECK: 0x0000000b: DW_TAG_compile_unit [1] -# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) +# CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text") # CHECK-NEXT: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000 # CHECK-NEXT: [0x0000000000000000, 0x0000000000000001) ".text" # CHECK-NEXT: [0x0000000000000003, 0x0000000000000006) ".text" diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s index 71b955798396..8ac10521b225 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s +++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s @@ -14,7 +14,7 @@ .byte 0x4 # DW_AT_language [DW_FORM_data1] (DW_LANG_C_plus_plus) .long 0 # DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000000] = "test") .long 0 # DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000000] = "test") - .long 0 # DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) + .long 0 # DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000 ".text") .long 0 # DW_AT_high_pc [DW_FORM_data4] (0x00000000) .section .debug_abbrev,"",@progbits