summaryrefslogtreecommitdiff
path: root/compiler/debug/dwarf/dwarf_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/debug/dwarf/dwarf_test.cc')
-rw-r--r--compiler/debug/dwarf/dwarf_test.cc44
1 files changed, 9 insertions, 35 deletions
diff --git a/compiler/debug/dwarf/dwarf_test.cc b/compiler/debug/dwarf/dwarf_test.cc
index 52717c352d..212fd63efa 100644
--- a/compiler/debug/dwarf/dwarf_test.cc
+++ b/compiler/debug/dwarf/dwarf_test.cc
@@ -121,19 +121,13 @@ TEST_F(DwarfTest, DebugFrame) {
DebugFrameOpCodeWriter<> initial_opcodes;
WriteCIE(is64bit, Reg(is64bit ? 16 : 8), initial_opcodes, &debug_frame_data_);
- std::vector<uintptr_t> debug_frame_patches;
- std::vector<uintptr_t> expected_patches = { 28 };
WriteFDE(is64bit,
- 0,
- 0,
+ /* cie_pointer= */ 0,
0x01000000,
0x01000000,
ArrayRef<const uint8_t>(*opcodes.data()),
- 0,
- &debug_frame_data_,
- &debug_frame_patches);
+ &debug_frame_data_);
- EXPECT_EQ(expected_patches, debug_frame_patches);
CheckObjdumpOutput(is64bit, "-W");
}
@@ -142,20 +136,14 @@ TEST_F(DwarfTest, DebugFrame64) {
DebugFrameOpCodeWriter<> initial_opcodes;
WriteCIE(is64bit, Reg(16), initial_opcodes, &debug_frame_data_);
DebugFrameOpCodeWriter<> opcodes;
- std::vector<uintptr_t> debug_frame_patches;
- std::vector<uintptr_t> expected_patches = { 32 };
WriteFDE(is64bit,
- 0,
- 0,
+ /* cie_pointer= */ 0,
0x0100000000000000,
0x0200000000000000,
ArrayRef<const uint8_t>(*opcodes.data()),
- 0,
- &debug_frame_data_,
- &debug_frame_patches);
+ &debug_frame_data_);
DW_CHECK("FDE cie=00000000 pc=100000000000000..300000000000000");
- EXPECT_EQ(expected_patches, debug_frame_patches);
CheckObjdumpOutput(is64bit, "-W");
}
@@ -186,16 +174,12 @@ TEST_F(DwarfTest, x86_64_RegisterMapping) {
DW_CHECK_NEXT("DW_CFA_offset: r15 (r15)");
DebugFrameOpCodeWriter<> initial_opcodes;
WriteCIE(is64bit, Reg(16), initial_opcodes, &debug_frame_data_);
- std::vector<uintptr_t> debug_frame_patches;
WriteFDE(is64bit,
- 0,
- 0,
+ /* cie_pointer= */ 0,
0x0100000000000000,
0x0200000000000000,
ArrayRef<const uint8_t>(*opcodes.data()),
- 0,
- &debug_frame_data_,
- &debug_frame_patches);
+ &debug_frame_data_);
CheckObjdumpOutput(is64bit, "-W");
}
@@ -250,12 +234,8 @@ TEST_F(DwarfTest, DebugLine) {
DW_CHECK_NEXT("Entry\tDir\tTime\tSize\tName");
DW_CHECK_NEXT("1\t0\t1000\t2000\tfile.c");
- std::vector<uintptr_t> debug_line_patches;
- std::vector<uintptr_t> expected_patches = { 87 };
- WriteDebugLineTable(include_directories, files, opcodes,
- 0, &debug_line_data_, &debug_line_patches);
+ WriteDebugLineTable(include_directories, files, opcodes, &debug_line_data_);
- EXPECT_EQ(expected_patches, debug_line_patches);
CheckObjdumpOutput(is64bit, "-W");
}
@@ -290,9 +270,7 @@ TEST_F(DwarfTest, DebugLineSpecialOpcodes) {
std::vector<std::string> directories;
std::vector<FileEntry> files = { { "file.c", 0, 1000, 2000 } };
- std::vector<uintptr_t> debug_line_patches;
- WriteDebugLineTable(directories, files, opcodes,
- 0, &debug_line_data_, &debug_line_patches);
+ WriteDebugLineTable(directories, files, opcodes, &debug_line_data_);
CheckObjdumpOutput(is64bit, "-W -WL");
}
@@ -346,12 +324,8 @@ TEST_F(DwarfTest, DebugInfo) {
DW_CHECK_NEXT("DW_AT_high_pc DW_FORM_addr");
DW_CHECK("3 DW_TAG_compile_unit [no children]");
- std::vector<uintptr_t> debug_info_patches;
- std::vector<uintptr_t> expected_patches = { 16, 20, 29, 33, 42, 46 };
- dwarf::WriteDebugInfoCU(/* debug_abbrev_offset= */ 0, info,
- 0, &debug_info_data_, &debug_info_patches);
+ dwarf::WriteDebugInfoCU(/* debug_abbrev_offset= */ 0, info, &debug_info_data_);
- EXPECT_EQ(expected_patches, debug_info_patches);
CheckObjdumpOutput(is64bit, "-W");
}