diff options
Diffstat (limited to 'compiler/debug/dwarf/dwarf_test.cc')
-rw-r--r-- | compiler/debug/dwarf/dwarf_test.cc | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/compiler/debug/dwarf/dwarf_test.cc b/compiler/debug/dwarf/dwarf_test.cc index 6512314ae8..52717c352d 100644 --- a/compiler/debug/dwarf/dwarf_test.cc +++ b/compiler/debug/dwarf/dwarf_test.cc @@ -29,8 +29,6 @@ namespace dwarf { // Run the tests only on host since we need objdump. #ifndef ART_TARGET_ANDROID -constexpr CFIFormat kCFIFormat = DW_DEBUG_FRAME_FORMAT; - TEST_F(DwarfTest, DebugFrame) { const bool is64bit = false; @@ -122,12 +120,18 @@ TEST_F(DwarfTest, DebugFrame) { DW_CHECK_NEXT("DW_CFA_restore: r5 (ebp)"); DebugFrameOpCodeWriter<> initial_opcodes; - WriteCIE(is64bit, Reg(is64bit ? 16 : 8), - initial_opcodes, kCFIFormat, &debug_frame_data_); + 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, 0x01000000, 0x01000000, ArrayRef<const uint8_t>(*opcodes.data()), - kCFIFormat, 0, &debug_frame_data_, &debug_frame_patches); + WriteFDE(is64bit, + 0, + 0, + 0x01000000, + 0x01000000, + ArrayRef<const uint8_t>(*opcodes.data()), + 0, + &debug_frame_data_, + &debug_frame_patches); EXPECT_EQ(expected_patches, debug_frame_patches); CheckObjdumpOutput(is64bit, "-W"); @@ -136,14 +140,19 @@ TEST_F(DwarfTest, DebugFrame) { TEST_F(DwarfTest, DebugFrame64) { constexpr bool is64bit = true; DebugFrameOpCodeWriter<> initial_opcodes; - WriteCIE(is64bit, Reg(16), - initial_opcodes, kCFIFormat, &debug_frame_data_); + 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, 0x0100000000000000, 0x0200000000000000, + WriteFDE(is64bit, + 0, + 0, + 0x0100000000000000, + 0x0200000000000000, ArrayRef<const uint8_t>(*opcodes.data()), - kCFIFormat, 0, &debug_frame_data_, &debug_frame_patches); + 0, + &debug_frame_data_, + &debug_frame_patches); DW_CHECK("FDE cie=00000000 pc=100000000000000..300000000000000"); EXPECT_EQ(expected_patches, debug_frame_patches); @@ -176,12 +185,17 @@ TEST_F(DwarfTest, x86_64_RegisterMapping) { DW_CHECK_NEXT("DW_CFA_offset: r14 (r14)"); DW_CHECK_NEXT("DW_CFA_offset: r15 (r15)"); DebugFrameOpCodeWriter<> initial_opcodes; - WriteCIE(is64bit, Reg(16), - initial_opcodes, kCFIFormat, &debug_frame_data_); + WriteCIE(is64bit, Reg(16), initial_opcodes, &debug_frame_data_); std::vector<uintptr_t> debug_frame_patches; - WriteFDE(is64bit, 0, 0, 0x0100000000000000, 0x0200000000000000, + WriteFDE(is64bit, + 0, + 0, + 0x0100000000000000, + 0x0200000000000000, ArrayRef<const uint8_t>(*opcodes.data()), - kCFIFormat, 0, &debug_frame_data_, &debug_frame_patches); + 0, + &debug_frame_data_, + &debug_frame_patches); CheckObjdumpOutput(is64bit, "-W"); } |