From a9b697975592b204e86496efc62a8b26fbfa1a03 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 19 Aug 2013 03:36:23 +0000 Subject: [PATCH] llvm-dwarfdump: Do not include address offsets for attributes, only for tags 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 | 2 +- test/DebugInfo/X86/DW_AT_specification.ll | 2 +- test/DebugInfo/X86/DW_TAG_friend.ll | 2 +- test/DebugInfo/X86/block-capture.ll | 4 ++-- test/DebugInfo/X86/elf-names.ll | 8 ++++---- .../DebugInfo/X86/nondefault-subrange-array.ll | 18 +++++++++--------- test/DebugInfo/X86/objc-fwd-decl.ll | 4 ++-- test/DebugInfo/X86/pr11300.ll | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/DebugInfo/DWARFDebugInfoEntry.cpp b/lib/DebugInfo/DWARFDebugInfoEntry.cpp index 0c7b7e36771..9abf8dd2623 100644 --- a/lib/DebugInfo/DWARFDebugInfoEntry.cpp +++ b/lib/DebugInfo/DWARFDebugInfoEntry.cpp @@ -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) diff --git a/test/DebugInfo/X86/DW_AT_specification.ll b/test/DebugInfo/X86/DW_AT_specification.ll index 93e1ecf38f6..8c90492ea25 100644 --- a/test/DebugInfo/X86/DW_AT_specification.ll +++ b/test/DebugInfo/X86/DW_AT_specification.ll @@ -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 diff --git a/test/DebugInfo/X86/DW_TAG_friend.ll b/test/DebugInfo/X86/DW_TAG_friend.ll index 2e23222588e..6a1986d09a0 100644 --- a/test/DebugInfo/X86/DW_TAG_friend.ll +++ b/test/DebugInfo/X86/DW_TAG_friend.ll @@ -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 } diff --git a/test/DebugInfo/X86/block-capture.ll b/test/DebugInfo/X86/block-capture.ll index 004673061d8..7f5b3621f38 100644 --- a/test/DebugInfo/X86/block-capture.ll +++ b/test/DebugInfo/X86/block-capture.ll @@ -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* } diff --git a/test/DebugInfo/X86/elf-names.ll b/test/DebugInfo/X86/elf-names.ll index 7bc532ebad0..12d8005b945 100644 --- a/test/DebugInfo/X86/elf-names.ll +++ b/test/DebugInfo/X86/elf-names.ll @@ -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] diff --git a/test/DebugInfo/X86/nondefault-subrange-array.ll b/test/DebugInfo/X86/nondefault-subrange-array.ll index a5f786c26b2..49dccb28c0f 100644 --- a/test/DebugInfo/X86/nondefault-subrange-array.ll +++ b/test/DebugInfo/X86/nondefault-subrange-array.ll @@ -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} diff --git a/test/DebugInfo/X86/objc-fwd-decl.ll b/test/DebugInfo/X86/objc-fwd-decl.ll index 3070ff88b3b..666904fa1d0 100644 --- a/test/DebugInfo/X86/objc-fwd-decl.ll +++ b/test/DebugInfo/X86/objc-fwd-decl.ll @@ -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 diff --git a/test/DebugInfo/X86/pr11300.ll b/test/DebugInfo/X86/pr11300.ll index 54e0c8b6270..2c1a3c2b62c 100644 --- a/test/DebugInfo/X86/pr11300.ll +++ b/test/DebugInfo/X86/pr11300.ll @@ -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 } -- 2.34.1