From 7370d92da01ad07c649e3f988aaf55ee7585a803 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Tue, 12 Feb 2019 14:00:30 +0000 Subject: Remove oat_patches from the DWARF writer. We no longer use them. Test: test-art-host-gtest-dwarf_test Change-Id: Ie018d2314f028584edb398b6310a7284a0ec2069 --- compiler/debug/dwarf/headers.h | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) (limited to 'compiler/debug/dwarf/headers.h') diff --git a/compiler/debug/dwarf/headers.h b/compiler/debug/dwarf/headers.h index 119bfe98a5..869a2c256e 100644 --- a/compiler/debug/dwarf/headers.h +++ b/compiler/debug/dwarf/headers.h @@ -67,26 +67,16 @@ void WriteCIE(bool is64bit, // Write frame description entry (FDE) to .debug_frame or .eh_frame section. inline void WriteFDE(bool is64bit, - uint64_t section_address, // Absolute address of the section. - uint64_t cie_address, // Absolute address of last CIE. + uint64_t cie_pointer, // Offset of relevant CIE in debug_frame setcion. uint64_t code_address, uint64_t code_size, const ArrayRef& opcodes, - uint64_t buffer_address, // Address of buffer in linked application. - std::vector* buffer, - std::vector* patch_locations) { - CHECK_GE(cie_address, section_address); - CHECK_GE(buffer_address, section_address); - + /*inout*/ std::vector* buffer) { Writer<> writer(buffer); size_t fde_header_start = writer.data()->size(); writer.PushUint32(0); // Length placeholder. - uint32_t cie_pointer = cie_address - section_address; writer.PushUint32(cie_pointer); // Relocate code_address if it has absolute value. - if (patch_locations != nullptr) { - patch_locations->push_back(buffer_address + buffer->size() - section_address); - } if (is64bit) { writer.PushUint64(code_address); writer.PushUint64(code_size); @@ -128,9 +118,7 @@ bool ReadFDE(const uint8_t** data, Addr* addr, Addr* size, ArrayRef void WriteDebugInfoCU(uint32_t debug_abbrev_offset, const DebugInfoEntryWriter& entries, - size_t debug_info_offset, // offset from start of .debug_info. - std::vector* debug_info, - std::vector* debug_info_patches) { + std::vector* debug_info) { static_assert(std::is_same::value, "Invalid value type"); Writer<> writer(debug_info); @@ -143,10 +131,6 @@ void WriteDebugInfoCU(uint32_t debug_abbrev_offset, DCHECK_EQ(entries_offset, DebugInfoEntryWriter::kCompilationUnitHeaderSize); writer.PushData(entries.data()); writer.UpdateUint32(start, writer.data()->size() - start - 4); - // Copy patch locations and make them relative to .debug_info section. - for (uintptr_t patch_location : entries.GetPatchLocations()) { - debug_info_patches->push_back(debug_info_offset + entries_offset + patch_location); - } } struct FileEntry { @@ -161,9 +145,7 @@ template void WriteDebugLineTable(const std::vector& include_directories, const std::vector& files, const DebugLineOpCodeWriter& opcodes, - size_t debug_line_offset, // offset from start of .debug_line. - std::vector* debug_line, - std::vector* debug_line_patches) { + std::vector* debug_line) { static_assert(std::is_same::value, "Invalid value type"); Writer<> writer(debug_line); @@ -194,13 +176,8 @@ void WriteDebugLineTable(const std::vector& include_directories, } writer.PushUint8(0); // Terminate file list. writer.UpdateUint32(header_length_pos, writer.data()->size() - header_length_pos - 4); - size_t opcodes_offset = writer.data()->size(); writer.PushData(opcodes.data()); writer.UpdateUint32(header_start, writer.data()->size() - header_start - 4); - // Copy patch locations and make them relative to .debug_line section. - for (uintptr_t patch_location : opcodes.GetPatchLocations()) { - debug_line_patches->push_back(debug_line_offset + opcodes_offset + patch_location); - } } } // namespace dwarf -- cgit v1.2.3-59-g8ed1b