]> granicus.if.org Git - llvm/commitdiff
llvm-dwarfdump: Dump the section name/number for addr attributes
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 22 Dec 2018 20:34:58 +0000 (20:34 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 22 Dec 2018 20:34:58 +0000 (20:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350009 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 241f9a70603cfe3417f06fac29000097852c3303..b7b359878f962e895aa80bd6b1c81f1bdc76b8ba 100644 (file)
@@ -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:
index 6ce5f02344571b52fa8aad0f89521b895c4b458e..956b10d64ab4d6b182b94442979cd4d38e361862 100644 (file)
@@ -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
index 6940b1be4d78da2463623516917eec0fc5327b72..8e2a59287f78cd3489391c2f99e785c1bd4db58e 100644 (file)
@@ -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"
index c5f80d062970e02321981c11f485ed8f6a6cc130..07b7972ec1a240297bb643ad1cdde1ad6dad3a7a 100644 (file)
@@ -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
index 25ea30d737cc3ed87dfcc42ac807bc571f33d296..7d5a6f938bd4b7b86b2449c4608a35eb1658925e 100644 (file)
@@ -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"
index 71b955798396de6721819dd98528d96d6601c5f1..8ac10521b22526340ae57cce8cafe6270e8dcf63 100644 (file)
@@ -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