diff options
author | 2019-02-08 15:51:31 +0000 | |
---|---|---|
committer | 2019-02-12 13:51:16 +0000 | |
commit | 91b290038cbd00a48028922a5e76c0c39d6ebcb6 (patch) | |
tree | 0b05e3a20da9ae131b9299554b4c7efa7e156f7d /compiler/debug/dwarf/dwarf_test.cc | |
parent | 794350fd0e21aa9e259b6c45394494871e7fdb13 (diff) |
Remove support for generating .eh_frame ELF section.
The eh_frame support was originally added because the
old libunwind library didn't support debug_frame.
The new libunwind supports debug_frame well, and since
we have switched to it, we can remove the legacy code.
The main advantage of debug_frame is that it can be
compressed as part of mini-debug-info.
I am somewhat preserving the .eh_frame_hdr binary
search table (renamed as .debug_frame_hdr.android).
Bug: 123621350
Test: Generated framework oat files are identical.
Change-Id: I35b18895482f2176e02df07b086af7a1d40f90d5
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"); } |