summaryrefslogtreecommitdiff
path: root/compiler/debug/dwarf/headers.h
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2019-02-12 14:00:30 +0000
committer David Srbecky <dsrbecky@google.com> 2019-02-12 14:44:44 +0000
commit7370d92da01ad07c649e3f988aaf55ee7585a803 (patch)
tree961717b2838d923b87b2ecf1ebac55a8c5ecaa8d /compiler/debug/dwarf/headers.h
parent91b290038cbd00a48028922a5e76c0c39d6ebcb6 (diff)
Remove oat_patches from the DWARF writer.
We no longer use them. Test: test-art-host-gtest-dwarf_test Change-Id: Ie018d2314f028584edb398b6310a7284a0ec2069
Diffstat (limited to 'compiler/debug/dwarf/headers.h')
-rw-r--r--compiler/debug/dwarf/headers.h31
1 files changed, 4 insertions, 27 deletions
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<const uint8_t>& opcodes,
- uint64_t buffer_address, // Address of buffer in linked application.
- std::vector<uint8_t>* buffer,
- std::vector<uintptr_t>* patch_locations) {
- CHECK_GE(cie_address, section_address);
- CHECK_GE(buffer_address, section_address);
-
+ /*inout*/ std::vector<uint8_t>* 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<const uint8_
template<typename Vector>
void WriteDebugInfoCU(uint32_t debug_abbrev_offset,
const DebugInfoEntryWriter<Vector>& entries,
- size_t debug_info_offset, // offset from start of .debug_info.
- std::vector<uint8_t>* debug_info,
- std::vector<uintptr_t>* debug_info_patches) {
+ std::vector<uint8_t>* debug_info) {
static_assert(std::is_same<typename Vector::value_type, uint8_t>::value, "Invalid value type");
Writer<> writer(debug_info);
@@ -143,10 +131,6 @@ void WriteDebugInfoCU(uint32_t debug_abbrev_offset,
DCHECK_EQ(entries_offset, DebugInfoEntryWriter<Vector>::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<typename Vector>
void WriteDebugLineTable(const std::vector<std::string>& include_directories,
const std::vector<FileEntry>& files,
const DebugLineOpCodeWriter<Vector>& opcodes,
- size_t debug_line_offset, // offset from start of .debug_line.
- std::vector<uint8_t>* debug_line,
- std::vector<uintptr_t>* debug_line_patches) {
+ std::vector<uint8_t>* debug_line) {
static_assert(std::is_same<typename Vector::value_type, uint8_t>::value, "Invalid value type");
Writer<> writer(debug_line);
@@ -194,13 +176,8 @@ void WriteDebugLineTable(const std::vector<std::string>& 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