llvm-dwarfdump: Do not include address offsets for attributes, only for tags
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 19 Aug 2013 03:36:23 +0000 (03:36 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 19 Aug 2013 03:36:23 +0000 (03:36 +0000)
This reduces the noise in diffs making it more likely that, at least for
LLVM revision-over-revision, diffs will actually yield usable results.

This is consistent with objdump's DWARF dumping behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188650 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARFDebugInfoEntry.cpp
test/DebugInfo/X86/DW_AT_specification.ll
test/DebugInfo/X86/DW_TAG_friend.ll
test/DebugInfo/X86/block-capture.ll
test/DebugInfo/X86/elf-names.ll
test/DebugInfo/X86/nondefault-subrange-array.ll
test/DebugInfo/X86/objc-fwd-decl.ll
test/DebugInfo/X86/pr11300.ll

index 0c7b7e36771fc28586038ec466ff669e431c1ac2..9abf8dd2623b1c641ceb51b8874766355560ddff 100644 (file)
@@ -71,7 +71,7 @@ void DWARFDebugInfoEntryMinimal::dumpAttribute(raw_ostream &OS,
                                                uint16_t attr,
                                                uint16_t form,
                                                unsigned indent) const {
-  OS << format("0x%8.8x: ", *offset_ptr);
+  OS << "            ";
   OS.indent(indent+2);
   const char *attrString = AttributeString(attr);
   if (attrString)
index 93e1ecf38f62e7a841a74a6deca7c7b6251d5583..8c90492ea25f71adf8b76fcec0a700597e90012e 100644 (file)
@@ -4,7 +4,7 @@
 ; test that the DW_AT_specification is a back edge in the file.
 
 ; CHECK: 0x0000003a: DW_TAG_subprogram [5] *
-; CHECK: 0x00000060: DW_AT_specification [DW_FORM_ref4]      (cu + 0x003a => {0x0000003a})
+; CHECK: DW_AT_specification [DW_FORM_ref4]      (cu + 0x003a => {0x0000003a})
 
 
 @_ZZN3foo3barEvE1x = constant i32 0, align 4
index 2e23222588e0a82eed321c368d753a80969ffe66..6a1986d09a0c4682580e31bbec949359c4d64e8a 100644 (file)
@@ -6,7 +6,7 @@
 ; CHECK: 0x00000032:   DW_TAG_class_type [4]
 ; CHECK: 0x00000077:   DW_TAG_class_type [4]
 ; CHECK: 0x000000a0:     DW_TAG_friend [9]  
-; CHECK: 0x000000a1:       DW_AT_friend [DW_FORM_ref4]   (cu + 0x0032 => {0x00000032})
+; CHECK:                   DW_AT_friend [DW_FORM_ref4]   (cu + 0x0032 => {0x00000032})
 
 
 %class.A = type { i32 }
index 004673061d8c8cd135805b73d8a2cd36c2957ac2..7f5b3621f38be685095a2922dbf983e22347b76a 100644 (file)
@@ -4,8 +4,8 @@
 ; Checks that we emit debug info for the block variable declare.
 ; CHECK: 0x00000030:   DW_TAG_subprogram [3]
 ; CHECK: 0x0000005b:     DW_TAG_variable [5]
-; CHECK: 0x0000005c:       DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000e6] = "block")
-; CHECK: 0x00000066:       DW_AT_location [DW_FORM_data4]        (0x00000023)
+; CHECK:                   DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000e6] = "block")
+; CHECK:                   DW_AT_location [DW_FORM_data4]        (0x00000023)
 
 %struct.__block_descriptor = type { i64, i64 }
 %struct.__block_literal_generic = type { i8*, i32, i32, i8*, %struct.__block_descriptor* }
index 7bc532ebad067cc67804d61686db60f14375809b..12d8005b9458836a90cee840024d8f52f529ed8f 100644 (file)
@@ -3,12 +3,12 @@
 ; RUN: llvm-as < %s | llvm-dis | FileCheck --check-prefix=CHECK-DIS %s
 
 ; CHECK: 0x0000000b: DW_TAG_compile_unit
-; CHECK: 0x00000012:   DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000035] = "foo.cpp")
+; CHECK:               DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000035] = "foo.cpp")
 ; CHECK: 0x0000003c:   DW_TAG_class_type
-; CHECK: 0x0000003d:     DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000006d] = "D")
+; CHECK:                 DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000006d] = "D")
 ; CHECK: 0x00000044:     DW_TAG_member
-; CHECK: 0x00000045:       DW_AT_name [DW_FORM_strp]     ( .debug_str[0x0000005d] = "c1")
-; CHECK: 0x0000008d:       DW_AT_artificial [DW_FORM_flag_present]       (true)
+; CHECK:                   DW_AT_name [DW_FORM_strp]     ( .debug_str[0x0000005d] = "c1")
+; CHECK:                   DW_AT_artificial [DW_FORM_flag_present]       (true)
 
 ; CHECK-DIS: [artificial]
 
index a5f786c26b267638b70e68934d73a7619cc187c3..49dccb28c0f4f0192265ba054533cebfe92998a8 100644 (file)
@@ -9,21 +9,21 @@
 ; goes from [-3, 38].
 
 ; CHECK:      0x0000002d:   DW_TAG_base_type [3]
-; CHECK-NEXT: 0x0000002e:     DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000041] = "int")
-; CHECK-NEXT: 0x00000032:     DW_AT_byte_size [DW_FORM_data1] (0x04)
-; CHECK-NEXT: 0x00000033:     DW_AT_encoding [DW_FORM_data1]  (0x05)
+; CHECK-NEXT:                 DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000041] = "int")
+; CHECK-NEXT:                 DW_AT_byte_size [DW_FORM_data1] (0x04)
+; CHECK-NEXT:                 DW_AT_encoding [DW_FORM_data1]  (0x05)
 
 ; CHECK:      0x00000034:   DW_TAG_array_type [4] *
-; CHECK-NEXT: 0x00000035:     DW_AT_type [DW_FORM_ref4]    (cu + 0x0026 => {0x00000026})
+; CHECK-NEXT:                 DW_AT_type [DW_FORM_ref4]    (cu + 0x0026 => {0x00000026})
 
 ; CHECK:      0x00000039:     DW_TAG_subrange_type [5]
-; CHECK-NEXT: 0x0000003a:       DW_AT_type [DW_FORM_ref4]  (cu + 0x002d => {0x0000002d})
-; CHECK-NEXT: 0x0000003e:       DW_AT_lower_bound [DW_FORM_data8]       (0xfffffffffffffffd)
-; CHECK-NEXT: 0x00000046:       DW_AT_upper_bound [DW_FORM_data1]       (0x26)
+; CHECK-NEXT:                   DW_AT_type [DW_FORM_ref4]  (cu + 0x002d => {0x0000002d})
+; CHECK-NEXT:                   DW_AT_lower_bound [DW_FORM_data8]       (0xfffffffffffffffd)
+; CHECK-NEXT:                   DW_AT_upper_bound [DW_FORM_data1]       (0x26)
 
 ; CHECK:      0x00000055:     DW_TAG_member [8]
-; CHECK-NEXT: 0x00000056:       DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000003f] = "x")
-; CHECK-NEXT: 0x0000005a:       DW_AT_type [DW_FORM_ref4]       (cu + 0x0034 => {0x00000034})
+; CHECK-NEXT:                   DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000003f] = "x")
+; CHECK-NEXT:                   DW_AT_type [DW_FORM_ref4]       (cu + 0x0034 => {0x00000034})
 
 !llvm.dbg.cu = !{!0}
 
index 3070ff88b3b91c798b3b9918580ec9e347cfc99d..666904fa1d0e0465d6ab348bfcb224fb130d2583 100644 (file)
@@ -2,8 +2,8 @@
 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
 
 ; CHECK: 0x00000027:   DW_TAG_structure_type
-; CHECK: 0x0000002c:     DW_AT_declaration
-; CHECK: 0x0000002d:     DW_AT_APPLE_runtime_class
+; CHECK:                 DW_AT_declaration
+; CHECK:                 DW_AT_APPLE_runtime_class
 
 %0 = type opaque
 
index 54e0c8b6270c1370fa23d006cdfe0918d01bdbd6..2c1a3c2b62c43aab4db4afdfc9b3107bb7a88456 100644 (file)
@@ -4,7 +4,7 @@
 ; test that the DW_AT_specification is a back edge in the file.
 
 ; CHECK: 0x0000005c:     DW_TAG_subprogram [5]
-; CHECK: 0x0000007c:     DW_AT_specification [DW_FORM_ref4]      (cu + 0x005c => {0x0000005c})
+; CHECK:                 DW_AT_specification [DW_FORM_ref4]      (cu + 0x005c => {0x0000005c})
 
 %struct.foo = type { i8 }