[llvm] ec9d7ea - [DebugInfo] Report the format of tables in .debug_pub* sections [8/10]
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 03:57:19 PDT 2020
Author: Igor Kudrin
Date: 2020-06-02T17:55:31+07:00
New Revision: ec9d7ea4f5bb4e0d07ca9e3aa77b0279b19e58b1
URL: https://github.com/llvm/llvm-project/commit/ec9d7ea4f5bb4e0d07ca9e3aa77b0279b19e58b1
DIFF: https://github.com/llvm/llvm-project/commit/ec9d7ea4f5bb4e0d07ca9e3aa77b0279b19e58b1.diff
LOG: [DebugInfo] Report the format of tables in .debug_pub* sections [8/10]
Differential Revision: https://reviews.llvm.org/D80523
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s
llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
llvm/test/DebugInfo/dwarfdump-pubnames.test
llvm/test/tools/dsymutil/ARM/obfuscated.test
llvm/test/tools/dsymutil/X86/basic-linking-x86.test
llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test
llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
index 04af91c1c96c..eecca87d5270 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
@@ -52,6 +52,7 @@ void DWARFDebugPubTable::dump(raw_ostream &OS) const {
for (const Set &S : Sets) {
int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(S.Format);
OS << "length = " << format("0x%0*" PRIx64, OffsetDumpWidth, S.Length);
+ OS << ", format = " << dwarf::FormatString(S.Format);
OS << ", version = " << format("0x%04x", S.Version);
OS << ", unit_offset = "
<< format("0x%0*" PRIx64, OffsetDumpWidth, S.Offset);
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s b/llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s
index eedaea79cbc4..7ca56c3aea37 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s
@@ -4,6 +4,7 @@
# CHECK: .debug_pubnames contents:
# CHECK-NEXT: length = 0x0000000000000032
+# CHECK-SAME: format = DWARF64
# CHECK-SAME: version = 0x0002
# CHECK-SAME: unit_offset = 0x0000112233445566
# CHECK-SAME: unit_size = 0x0000110022003300
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
index f0cb77558f67..3984ad40f114 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
@@ -21,7 +21,7 @@
; GPUB-NEXT: "f3"
; GPUB: .debug_gnu_pubtypes contents:
-; GPUB-NEXT: length = 0x0000000e, version = 0x0002, unit_offset = 0x00000000
+; GPUB-NEXT: length = 0x0000000e, format = DWARF32, version = 0x0002, unit_offset = 0x00000000
; GPUB-NEXT: Name
; NONE-NOT: .debug_pubnames contents:
diff --git a/llvm/test/DebugInfo/dwarfdump-pubnames.test b/llvm/test/DebugInfo/dwarfdump-pubnames.test
index a1765d258f7c..c658101b7210 100644
--- a/llvm/test/DebugInfo/dwarfdump-pubnames.test
+++ b/llvm/test/DebugInfo/dwarfdump-pubnames.test
@@ -2,7 +2,7 @@ RUN: llvm-dwarfdump %p/Inputs/dwarfdump-pubnames.elf-x86-64 \
RUN: --debug-pubnames | FileCheck %s
CHECK: .debug_pubnames contents:
-CHECK: length = 0x000000a1, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000141
+CHECK: length = 0x000000a1, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000141
CHECK: Offset Name
CHECK: 0x00000098 "global_namespace_variable"
diff --git a/llvm/test/tools/dsymutil/ARM/obfuscated.test b/llvm/test/tools/dsymutil/ARM/obfuscated.test
index f7135ed15a72..b0e3918b7ae6 100644
--- a/llvm/test/tools/dsymutil/ARM/obfuscated.test
+++ b/llvm/test/tools/dsymutil/ARM/obfuscated.test
@@ -119,19 +119,19 @@ CHECK: mod_time: 0x00000000
CHECK: length: 0x00000000
CHECK: .debug_pubnames contents:
-CHECK: length = 0x00000017, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000044
+CHECK: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000044
CHECK: 0x0000002e "main"
-CHECK: length = 0x00000016, version = 0x0002, unit_offset = 0x00000044, unit_size = 0x00000044
+CHECK: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000044, unit_size = 0x00000044
CHECK: 0x0000002e "one"
-CHECK: length = 0x00000016, version = 0x0002, unit_offset = 0x00000088, unit_size = 0x00000044
+CHECK: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000088, unit_size = 0x00000044
CHECK: 0x0000002e "two"
-CHECK: length = 0x00000018, version = 0x0002, unit_offset = 0x000000cc, unit_size = 0x00000044
+CHECK: length = 0x00000018, format = DWARF32, version = 0x0002, unit_offset = 0x000000cc, unit_size = 0x00000044
CHECK: 0x0000002e "three"
-CHECK: length = 0x00000017, version = 0x0002, unit_offset = 0x00000110, unit_size = 0x00000044
+CHECK: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000110, unit_size = 0x00000044
CHECK: 0x0000002e "four"
-CHECK: length = 0x00000017, version = 0x0002, unit_offset = 0x00000154, unit_size = 0x00000044
+CHECK: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000154, unit_size = 0x00000044
CHECK: 0x0000002e "five"
-CHECK: length = 0x00000016, version = 0x0002, unit_offset = 0x00000198, unit_size = 0x00000044
+CHECK: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000198, unit_size = 0x00000044
CHECK: 0x0000002e "six"
CHECK: .apple_names contents:
diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
index 2d304f9e994e..754aaf3d4e89 100644
--- a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
+++ b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
@@ -190,29 +190,29 @@ CHECK-NEXT: 0x0000000100000f9b 12 0 1 0 0 is_stmt p
CHECK-NEXT: 0x0000000100000fa9 12 0 1 0 0 is_stmt end_sequence
CHECK: .debug_pubnames contents:
-CHECK-NEXT: length = 0x00000017, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
+CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "main"
-CHECK-NEXT: length = 0x00000036, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5
+CHECK-NEXT: length = 0x00000036, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x0000002d "private_int"
CHECK-NEXT: 0x00000042 "baz"
CHECK-NEXT: 0x00000057 "foo"
CHECK-NEXT: 0x00000086 "inc"
-CHECK-NEXT: length = 0x00000026, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096
+CHECK-NEXT: length = 0x00000026, format = DWARF32, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "val"
CHECK-NEXT: 0x00000048 "bar"
CHECK-NEXT: 0x00000077 "inc"
CHECK: .debug_pubtypes contents:
-CHECK-NEXT: length = 0x0000001f, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
+CHECK-NEXT: length = 0x0000001f, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000063 "int"
CHECK-NEXT: 0x00000079 "char"
-CHECK-NEXT: length = 0x00000016, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5
+CHECK-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "int"
-CHECK-NEXT: length = 0x00000016, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096
+CHECK-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000041 "int"
diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test
index e80057a91506..e1dc3f411cb4 100644
--- a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test
+++ b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test
@@ -180,23 +180,23 @@ CHECK-NEXT: 0x0000000100000fb2 20 1 1 0 0 is_stmt
CHECK-NEXT: 0x0000000100000fb4 20 1 1 0 0 is_stmt end_sequence
CHECK: .debug_pubnames contents:
-CHECK-NEXT: length = 0x00000017, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000077
+CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000077
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x0000002a "main"
-CHECK-NEXT: length = 0x0000002e, version = 0x0002, unit_offset = 0x00000077, unit_size = 0x000000a4
+CHECK-NEXT: length = 0x0000002e, format = DWARF32, version = 0x0002, unit_offset = 0x00000077, unit_size = 0x000000a4
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000031 "baz"
CHECK-NEXT: 0x00000046 "private_int"
CHECK-NEXT: 0x00000067 "foo"
-CHECK-NEXT: length = 0x0000001e, version = 0x0002, unit_offset = 0x0000011b, unit_size = 0x00000085
+CHECK-NEXT: length = 0x0000001e, format = DWARF32, version = 0x0002, unit_offset = 0x0000011b, unit_size = 0x00000085
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x0000002a "val"
CHECK-NEXT: 0x00000050 "bar"
CHECK: .debug_pubtypes contents:
-CHECK-NEXT: length = 0x00000017, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000077
+CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000077
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x0000006f "char"
-CHECK-NEXT: length = 0x00000016, version = 0x0002, unit_offset = 0x00000077, unit_size = 0x000000a4
+CHECK-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000077, unit_size = 0x000000a4
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x0000002a "int"
diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
index 4db2883cebfd..509755a52155 100644
--- a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
+++ b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
@@ -179,21 +179,21 @@ CHECK: 0x0000000100000fb2 20 0 1 0 0 is_stmt
CHECK: 0x0000000100000fb4 20 0 1 0 0 is_stmt end_sequence
CHECK: .debug_pubnames contents:
-CHECK-NEXT: length = 0x00000017, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
+CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "main"
-CHECK-NEXT: length = 0x0000002e, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000b9
+CHECK-NEXT: length = 0x0000002e, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000b9
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "private_int"
CHECK-NEXT: 0x0000003f "baz"
CHECK-NEXT: 0x00000058 "foo"
-CHECK-NEXT: length = 0x0000001e, version = 0x0002, unit_offset = 0x0000013a, unit_size = 0x000000ac
+CHECK-NEXT: length = 0x0000001e, format = DWARF32, version = 0x0002, unit_offset = 0x0000013a, unit_size = 0x000000ac
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000026 "val"
CHECK-NEXT: 0x00000045 "bar"
CHECK: .debug_pubtypes contents:
-CHECK-NEXT: length = 0x0000001f, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
+CHECK-NEXT: length = 0x0000001f, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081
CHECK-NEXT: Offset Name
CHECK-NEXT: 0x00000063 "int"
CHECK-NEXT: 0x00000079 "char"
More information about the llvm-commits
mailing list