[llvm] 1d01fc1 - [Test] Simplify DWARF test cases. NFC.
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 23:05:02 PDT 2020
Author: Xing GUO
Date: 2020-08-31T14:03:48+08:00
New Revision: 1d01fc100bb5bef5f5eaf92520b2e52f64ee1d6e
URL: https://github.com/llvm/llvm-project/commit/1d01fc100bb5bef5f5eaf92520b2e52f64ee1d6e
DIFF: https://github.com/llvm/llvm-project/commit/1d01fc100bb5bef5f5eaf92520b2e52f64ee1d6e.diff
LOG: [Test] Simplify DWARF test cases. NFC.
The Length, AbbrOffset and Values fields of the debug_info section are
optional. This patch helps remove them and simplify test cases.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D86857
Added:
Modified:
lldb/test/API/functionalities/source-map/a.yaml
lldb/unittests/Expression/DWARFExpressionTest.cpp
lldb/unittests/Symbol/Inputs/inlined-functions.yaml
lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/source-map/a.yaml b/lldb/test/API/functionalities/source-map/a.yaml
index 477f0bd7b9da..53a07ea7443c 100644
--- a/lldb/test/API/functionalities/source-map/a.yaml
+++ b/lldb/test/API/functionalities/source-map/a.yaml
@@ -297,9 +297,7 @@ DWARF:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_info:
- - Length: 122
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -345,7 +343,6 @@ DWARF:
- Value: 0x0000000000000001
- Value: 0x0000000000000067
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000004
Values:
- Value: 0x0000000000000059
@@ -366,7 +363,6 @@ DWARF:
- Value: 0x0000000000000006
- Value: 0x0000000000000001
- AbbrCode: 0x00000000
- Values: []
debug_line:
- Length: 68
Version: 4
diff --git a/lldb/unittests/Expression/DWARFExpressionTest.cpp b/lldb/unittests/Expression/DWARFExpressionTest.cpp
index 7c1f2ef8a764..c02de402b4dd 100644
--- a/lldb/unittests/Expression/DWARFExpressionTest.cpp
+++ b/lldb/unittests/Expression/DWARFExpressionTest.cpp
@@ -96,7 +96,6 @@ TEST(DWARFExpression, DW_OP_convert) {
" Form: DW_FORM_data1\n"
"debug_info:\n"
" - Version: 4\n"
- " AbbrOffset: 0\n"
" AddrSize: 8\n"
" Entries:\n"
" - AbbrCode: 0x00000001\n"
@@ -132,9 +131,7 @@ TEST(DWARFExpression, DW_OP_convert) {
" Values:\n"
" - Value: 0x000000000000000b\n" // DW_ATE_numeric_string
" - Value: 0x0000000000000001\n"
- ""
- " - AbbrCode: 0x00000000\n"
- " Values: []\n";
+ " - AbbrCode: 0x00000000\n";
uint8_t offs_uint32_t = 0x0000000e;
uint8_t offs_uint64_t = 0x00000011;
uint8_t offs_sint64_t = 0x00000014;
diff --git a/lldb/unittests/Symbol/Inputs/inlined-functions.yaml b/lldb/unittests/Symbol/Inputs/inlined-functions.yaml
index 0443fcca58f1..050ee869d3c0 100644
--- a/lldb/unittests/Symbol/Inputs/inlined-functions.yaml
+++ b/lldb/unittests/Symbol/Inputs/inlined-functions.yaml
@@ -343,9 +343,7 @@ DWARF:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_info:
- - Length: 579
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -411,7 +409,6 @@ DWARF:
- Value: 0x0000000000000007
- Value: 0x00000000000000B2
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000005
Values:
- Value: 0x0000000000000094
@@ -440,7 +437,6 @@ DWARF:
- Value: 0x0000000000000002
- Value: 0x00000000000000B2
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000008
Values:
- Value: 0x00000000000000A3
@@ -486,7 +482,6 @@ DWARF:
- Value: 0x000000000000000C
- Value: 0x00000000000000B2
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000009
Values:
- Value: 0x0000000000000020
@@ -562,7 +557,6 @@ DWARF:
- 0x7F
- Value: 0x00000000000000A6
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x0000000A
Values:
- Value: 0x00000000000000B9
@@ -634,7 +628,6 @@ DWARF:
- 0x68
- Value: 0x00000000000000A6
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x0000000A
Values:
- Value: 0x0000000000000080
@@ -664,9 +657,7 @@ DWARF:
- 0x74
- Value: 0x00000000000000A6
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x0000000A
Values:
- Value: 0x0000000000000080
@@ -696,9 +687,7 @@ DWARF:
- 0x48
- Value: 0x00000000000000A6
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x0000000D
Values:
- Value: 0x000000000000023A
@@ -711,7 +700,6 @@ DWARF:
- Value: 0x0000000000000006
- Value: 0x0000000000000001
- AbbrCode: 0x00000000
- Values: []
debug_line:
- Length: 202
Version: 4
diff --git a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
index 031b5bcd66ac..2574fd9019e3 100644
--- a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
+++ b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
@@ -58,7 +58,6 @@ TEST_F(DWARFASTParserClangTests,
" Form: DW_FORM_data1\n"
"debug_info:\n"
" - Version: 4\n"
- " AbbrOffset: 0\n"
" AddrSize: 8\n"
" Entries:\n"
" - AbbrCode: 0x00000001\n"
@@ -84,9 +83,7 @@ TEST_F(DWARFASTParserClangTests,
" Values:\n"
" - Value: 0x0000000000000008\n" // DW_ATE_unsigned_char
" - Value: 0x0000000000000001\n"
- ""
- " - AbbrCode: 0x00000000\n"
- " Values: []\n";
+ " - AbbrCode: 0x00000000\n";
YAMLModuleTester t(yamldata, "i386-unknown-linux");
ASSERT_TRUE((bool)t.GetDwarfUnit());
diff --git a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
index 6bda91564c58..0bd0e3c6cb1b 100644
--- a/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
+++ b/lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
@@ -48,9 +48,7 @@ TEST_F(XcodeSDKModuleTests, TestModuleGetXcodeSDK) {
- Attribute: DW_AT_APPLE_sdk
Form: DW_FORM_strp
debug_info:
- - Length: 8
- Version: 2
- AbbrOffset: 0
+ - Version: 2
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -58,7 +56,6 @@ TEST_F(XcodeSDKModuleTests, TestModuleGetXcodeSDK) {
- Value: 0x000000000000000C
- Value: 0x0000000000000000
- AbbrCode: 0x00000000
- Values: []
...
)";
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
index 21623d493396..0775de8907ea 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml
@@ -224,9 +224,7 @@ DWARF:
- LowOffset: 0x0000000000001000
HighOffset: 0x0000000000002000
debug_info:
- - Length: 99
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -256,5 +254,4 @@ DWARF:
- Value: 0x0000000000002000
- Value: 0x0000000000001000
- AbbrCode: 0x00000000
- Values: []
...
diff --git a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
index b1e378ff7e97..d516b3704e71 100644
--- a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
+++ b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
@@ -406,9 +406,7 @@ Slices:
- DieOffset: 0x0000006F
Name: char
debug_info:
- - Length: 115
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 4
Entries:
- AbbrCode: 0x00000001
@@ -450,7 +448,6 @@ Slices:
- Value: 0x0000000000000001
- Value: 0x0000000000000060
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000004
Values:
- Value: 0x000000000000004E
@@ -471,7 +468,6 @@ Slices:
- Value: 0x0000000000000006
- Value: 0x0000000000000001
- AbbrCode: 0x00000000
- Values: []
debug_line:
- Length: 55
Version: 4
diff --git a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml b/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
index 49b7ff8affa7..a1d3a50c6c82 100644
--- a/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
+++ b/llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
@@ -573,9 +573,7 @@ DWARF:
- DieOffset: 0x000000D8
Name: char
debug_info:
- - Length: 220
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -601,7 +599,6 @@ DWARF:
BlockData: [ 0x91, 0x7C ]
- Value: 0x0000000000000056
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000004
Values:
- Value: 0x000000000000003F
@@ -618,7 +615,6 @@ DWARF:
- Value: 0x0000000000000001
- Value: 0x0000000000000062
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000006
Values:
- Value: 0x000000000000004D
@@ -672,9 +668,7 @@ DWARF:
BlockData: [ 0x91, 0x7C ]
- Value: 0x0000000000000056
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x00000000
- Values: []
- AbbrCode: 0x0000000B
Values:
- Value: 0x00000000000000CE
@@ -690,7 +684,6 @@ DWARF:
- Value: 0x0000000000000006
- Value: 0x0000000000000001
- AbbrCode: 0x00000000
- Values: []
debug_line:
- Length: 102
Version: 4
diff --git a/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml b/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml
index 6b12849fadef..3ec3b9c7521c 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml
+++ b/llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml
@@ -392,8 +392,7 @@ DWARF:
- Attribute: DW_AT_external
Form: DW_FORM_flag_present
debug_info:
- - Length: 113
- Version: 4
+ - Version: 4
AbbrOffset: 0
AddrSize: 8
Entries:
@@ -459,7 +458,6 @@ DWARF:
- Value: 0x000000000000003F
- Value: 0x0000000000000001
- AbbrCode: 0x00000000
- Values: []
debug_line:
- Length: 74
Version: 4
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
index fb3bea43180c..6b644b0a4eba 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -1372,9 +1372,7 @@ TEST(DWARFDebugInfo, TestEmptyChildren) {
" AddrSize: 8\n"
" Entries:\n"
" - AbbrCode: 0x00000001\n"
- " Values:\n"
- " - AbbrCode: 0x00000000\n"
- " Values:\n";
+ " - AbbrCode: 0x00000000\n";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -1900,8 +1898,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidCURef) {
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_info:
- - Length: 22
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1912,7 +1909,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidCURef) {
- Value: 0x000000000000000D
- Value: 0x0000000000001234
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -1948,8 +1944,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRefAddr) {
- Attribute: DW_AT_type
Form: DW_FORM_ref_addr
debug_info:
- - Length: 22
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1960,7 +1955,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRefAddr) {
- Value: 0x000000000000000D
- Value: 0x0000000000001234
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -1988,15 +1982,13 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRanges) {
- Attribute: DW_AT_ranges
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
Values:
- Value: 0x0000000000000001
- Value: 0x0000000000001000
-
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -2025,8 +2017,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRnglists) {
- Attribute: DW_AT_ranges
Form: DW_FORM_sec_offset
debug_info:
- - Length: 17
- Version: 5
+ - Version: 5
UnitType: DW_UT_compile
AddrSize: 8
Entries:
@@ -2034,7 +2025,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRnglists) {
Values:
- Value: 0x0000000000000001
- Value: 0x0000000000001000
-
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -2062,15 +2052,13 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidStmtList) {
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
Values:
- Value: 0x0000000000000001
- Value: 0x0000000000001000
-
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -2096,8 +2084,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidStrp) {
- Attribute: DW_AT_name
Form: DW_FORM_strp
debug_info:
- - Length: 12
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2137,8 +2124,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRefAddrBetween) {
- Attribute: DW_AT_type
Form: DW_FORM_ref_addr
debug_info:
- - Length: 22
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2149,7 +2135,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRefAddrBetween) {
- Value: 0x000000000000000D
- Value: 0x0000000000000011
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(StringRef(yamldata));
ASSERT_TRUE((bool)ErrOrSections);
@@ -2178,8 +2163,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidLineSequence) {
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2244,8 +2228,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidLineFileIndex) {
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2312,8 +2295,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidLineTablePorlogueDirIndex) {
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2381,8 +2363,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyDuplicateFileWarning) {
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2455,8 +2436,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyCUDontShareLineTable) {
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
debug_info:
- - Length: 16
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2578,8 +2558,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyCURangesIncomplete) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 46
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2592,7 +2571,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyCURangesIncomplete) {
- Value: 0x0000000000001000
- Value: 0x0000000000002000
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
@@ -2637,8 +2615,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyLexicalBlockRanges) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 52
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2654,9 +2631,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyLexicalBlockRanges) {
- Value: 0x0000000000001000
- Value: 0x0000000000002001
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
@@ -2694,8 +2669,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyOverlappingFunctionRanges) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 55
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2712,7 +2686,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyOverlappingFunctionRanges) {
- Value: 0x0000000000001FFF
- Value: 0x0000000000002000
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
@@ -2760,8 +2733,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyOverlappingLexicalBlockRanges) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 85
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2783,9 +2755,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyOverlappingLexicalBlockRanges) {
- Value: 0x00000000000012FF
- Value: 0x0000000000001300
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
@@ -2821,8 +2791,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidDIERange) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 34
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2834,7 +2803,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidDIERange) {
- Value: 0x0000000000001000
- Value: 0x0000000000000900
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
@@ -2877,8 +2845,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyElidedDoesntFail) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 71
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2897,7 +2864,6 @@ TEST(DWARFDebugInfo, TestDwarfVerifyElidedDoesntFail) {
- Value: 0x0000000000002000
- Value: 0x0000000000002000
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
@@ -2939,8 +2905,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyNestedFunctions) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 73
- Version: 4
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2959,11 +2924,8 @@ TEST(DWARFDebugInfo, TestDwarfVerifyNestedFunctions) {
- Value: 0x0000000000001500
- Value: 0x0000000000002000
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_TRUE((bool)ErrOrSections);
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
index 529c3b16cee5..5525ae6b7884 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
@@ -37,7 +37,6 @@ TEST(DWARFDie, getLocations) {
debug_info:
- Version: 5
UnitType: DW_UT_compile
- AbbrOffset: 0
AddrSize: 4
Entries:
- AbbrCode: 0x00000001
diff --git a/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp b/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
index 1ac030668ad2..caefd500ecdd 100644
--- a/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
+++ b/llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
@@ -1438,9 +1438,7 @@ TEST(GSYMTest, TestDWARFFunctionWithAddresses) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 52
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1455,7 +1453,6 @@ TEST(GSYMTest, TestDWARFFunctionWithAddresses) {
- Value: 0x0000000000001000
- Value: 0x0000000000002000
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_THAT_EXPECTED(ErrOrSections, Succeeded());
@@ -1518,9 +1515,7 @@ TEST(GSYMTest, TestDWARFFunctionWithAddressAndOffset) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_data4
debug_info:
- - Length: 44
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1535,7 +1530,6 @@ TEST(GSYMTest, TestDWARFFunctionWithAddressAndOffset) {
- Value: 0x0000000000001000
- Value: 0x0000000000001000
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_THAT_EXPECTED(ErrOrSections, Succeeded());
@@ -1618,9 +1612,7 @@ TEST(GSYMTest, TestDWARFStructMethodNoMangled) {
- Attribute: DW_AT_artificial
Form: DW_FORM_flag_present
debug_info:
- - Length: 68
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1643,11 +1635,8 @@ TEST(GSYMTest, TestDWARFStructMethodNoMangled) {
- Value: 0x0000000000000022
- Value: 0x0000000000000001
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_THAT_EXPECTED(ErrOrSections, Succeeded());
@@ -1723,9 +1712,7 @@ TEST(GSYMTest, TestDWARFTextRanges) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_data4
debug_info:
- - Length: 78
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1750,8 +1737,6 @@ TEST(GSYMTest, TestDWARFTextRanges) {
- Value: 0x0000000000000000
- Value: 0x0000000000000040
- AbbrCode: 0x00000000
- Values:
-
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_THAT_EXPECTED(ErrOrSections, Succeeded());
@@ -1837,9 +1822,7 @@ TEST(GSYMTest, TestDWARFInlineInfo) {
- Attribute: DW_AT_call_line
Form: DW_FORM_data4
debug_info:
- - Length: 74
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -1862,9 +1845,7 @@ TEST(GSYMTest, TestDWARFInlineInfo) {
- Value: 0x0000000000000001
- Value: 0x000000000000000A
- AbbrCode: 0x00000000
- Values:
- AbbrCode: 0x00000000
- Values:
debug_line:
- Length: 96
Version: 2
@@ -2093,9 +2074,7 @@ TEST(GSYMTest, TestDWARFNoLines) {
- Attribute: DW_AT_decl_line
Form: DW_FORM_data1
debug_info:
- - Length: 103
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2130,7 +2109,6 @@ TEST(GSYMTest, TestDWARFNoLines) {
- Value: 0x0000000000000001
- Value: 0x0000000000000028
- AbbrCode: 0x00000000
- Values: []
debug_line:
- Length: 92
Version: 2
@@ -2342,9 +2320,7 @@ TEST(GSYMTest, TestDWARFDeadStripAddr4) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 75
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 4
Entries:
- AbbrCode: 0x00000001
@@ -2374,7 +2350,6 @@ TEST(GSYMTest, TestDWARFDeadStripAddr4) {
- Value: 0x0000000000004000
- Value: 0x0000000000003FFF
- AbbrCode: 0x00000000
- Values: []
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_THAT_EXPECTED(ErrOrSections, Succeeded());
@@ -2485,9 +2460,7 @@ TEST(GSYMTest, TestDWARFDeadStripAddr8) {
- Attribute: DW_AT_high_pc
Form: DW_FORM_addr
debug_info:
- - Length: 103
- Version: 4
- AbbrOffset: 0
+ - Version: 4
AddrSize: 8
Entries:
- AbbrCode: 0x00000001
@@ -2517,7 +2490,6 @@ TEST(GSYMTest, TestDWARFDeadStripAddr8) {
- Value: 0x0000000000004000
- Value: 0x0000000000003FFF
- AbbrCode: 0x00000000
- Values: []
)";
auto ErrOrSections = DWARFYAML::emitDebugSections(yamldata);
ASSERT_THAT_EXPECTED(ErrOrSections, Succeeded());
More information about the llvm-commits
mailing list