[llvm] r350009 - llvm-dwarfdump: Dump the section name/number for addr attributes

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 22 12:34:59 PST 2018


Author: dblaikie
Date: Sat Dec 22 12:34:58 2018
New Revision: 350009

URL: http://llvm.org/viewvc/llvm-project?rev=350009&view=rev
Log:
llvm-dwarfdump: Dump the section name/number for addr attributes

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
    llvm/trunk/test/DebugInfo/AArch64/dwarfdump.ll
    llvm/trunk/test/DebugInfo/SystemZ/variable-loc.s
    llvm/trunk/test/DebugInfo/X86/debug-loc-offset.mir
    llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s
    llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp?rev=350009&r1=350008&r2=350009&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp Sat Dec 22 12:34:58 2018
@@ -362,7 +362,7 @@ void DWARFFormValue::dump(raw_ostream &O
                             : 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:

Modified: llvm/trunk/test/DebugInfo/AArch64/dwarfdump.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/AArch64/dwarfdump.ll?rev=350009&r1=350008&r2=350009&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/AArch64/dwarfdump.ll (original)
+++ llvm/trunk/test/DebugInfo/AArch64/dwarfdump.ll Sat Dec 22 12:34:58 2018
@@ -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

Modified: llvm/trunk/test/DebugInfo/SystemZ/variable-loc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/SystemZ/variable-loc.s?rev=350009&r1=350008&r2=350009&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/SystemZ/variable-loc.s (original)
+++ llvm/trunk/test/DebugInfo/SystemZ/variable-loc.s Sat Dec 22 12:34:58 2018
@@ -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"

Modified: llvm/trunk/test/DebugInfo/X86/debug-loc-offset.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-loc-offset.mir?rev=350009&r1=350008&r2=350009&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/debug-loc-offset.mir (original)
+++ llvm/trunk/test/DebugInfo/X86/debug-loc-offset.mir Sat Dec 22 12:34:58 2018
@@ -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

Modified: llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s?rev=350009&r1=350008&r2=350009&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s (original)
+++ llvm/trunk/test/DebugInfo/X86/dwarfdump-ranges-baseaddr.s Sat Dec 22 12:34:58 2018
@@ -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"

Modified: llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s?rev=350009&r1=350008&r2=350009&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s (original)
+++ llvm/trunk/test/tools/llvm-dwarfdump/X86/verify_debug_info2.s Sat Dec 22 12:34:58 2018
@@ -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,"", at progbits




More information about the llvm-commits mailing list