[llvm] 937403d - [DebugInfo] Separate fields with commas in headers of .debug_pub* tables (1/3).
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 03:41:13 PDT 2020
Author: Igor Kudrin
Date: 2020-06-01T17:39:48+07:00
New Revision: 937403d68430cb59ff7ccba7b2a13b3a815c12fa
URL: https://github.com/llvm/llvm-project/commit/937403d68430cb59ff7ccba7b2a13b3a815c12fa
DIFF: https://github.com/llvm/llvm-project/commit/937403d68430cb59ff7ccba7b2a13b3a815c12fa.diff
LOG: [DebugInfo] Separate fields with commas in headers of .debug_pub* tables (1/3).
For most tables, we already use commas in headers. This set of patches
unifies dumping the remaining ones.
Differential Revision: https://reviews.llvm.org/D80806
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
llvm/test/DebugInfo/X86/gnu-public-names.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 70663fa85da4..04af91c1c96c 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
@@ -52,10 +52,10 @@ 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 << " version = " << format("0x%04x", S.Version);
- OS << " unit_offset = "
+ OS << ", version = " << format("0x%04x", S.Version);
+ OS << ", unit_offset = "
<< format("0x%0*" PRIx64, OffsetDumpWidth, S.Offset);
- OS << " unit_size = " << format("0x%0*" PRIx64, OffsetDumpWidth, S.Size)
+ OS << ", unit_size = " << format("0x%0*" PRIx64, OffsetDumpWidth, S.Size)
<< '\n';
OS << (GnuStyle ? "Offset Linkage Kind Name\n"
: "Offset Name\n");
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
index dc1475c912e5..f0cb77558f67 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, version = 0x0002, unit_offset = 0x00000000
; GPUB-NEXT: Name
; NONE-NOT: .debug_pubnames contents:
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll b/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
index 084c8028a5ea..46bf89ced335 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
@@ -17,13 +17,13 @@
; CHECK-LABEL: .debug_gnu_pubnames contents:
-; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}}
+; CHECK-NEXT: length = {{.*}}, version = 0x0002, unit_offset = 0x00000000, unit_size = {{.*}}
; CHECK-NEXT: Offset Linkage Kind Name
; CHECK-NEXT: [[CU]] EXTERNAL TYPE "ns"
; CHECK-NEXT: {{.*}} EXTERNAL VARIABLE "b"
; CHECK-LABEL: debug_gnu_pubtypes contents:
-; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}}
+; CHECK-NEXT: length = {{.*}}, version = 0x0002, unit_offset = 0x00000000, unit_size = {{.*}}
; CHECK-NEXT: Offset Linkage Kind Name
; CHECK-NEXT: [[BAR]] EXTERNAL TYPE "bar"
; CHECK-NEXT: [[CU]] EXTERNAL TYPE "ns::foo"
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names.ll b/llvm/test/DebugInfo/X86/gnu-public-names.ll
index c9ec1b59c48f..6535fce87dd6 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names.ll
@@ -239,7 +239,7 @@
; CHECK: DW_AT_name {{.*}} "global_function"
; CHECK-LABEL: .debug_gnu_pubnames contents:
-; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}}
+; CHECK-NEXT: length = {{.*}}, version = 0x0002, unit_offset = 0x00000000, unit_size = {{.*}}
; CHECK-NEXT: Offset Linkage Kind Name
; CHECK-NEXT: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function"
; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns"
diff --git a/llvm/test/DebugInfo/dwarfdump-pubnames.test b/llvm/test/DebugInfo/dwarfdump-pubnames.test
index 558ba658925d..a1765d258f7c 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, 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 9ce684cfb7e5..f7135ed15a72 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, 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, 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, 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, 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, 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, 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, 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 3f9ee4d51362..bc99054c9a28 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, 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, 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, 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, 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, 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, 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 8f4d80e4959d..dc3d04b79418 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, 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, 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, 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, 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, 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 ae1ba454bffd..347b1c951d2e 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, 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, 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, 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, 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