summaryrefslogtreecommitdiff
path: root/compiler/debug/elf_debug_writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/debug/elf_debug_writer.cc')
-rw-r--r--compiler/debug/elf_debug_writer.cc30
1 files changed, 12 insertions, 18 deletions
diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc
index 68c4e1530d..78c02b64f0 100644
--- a/compiler/debug/elf_debug_writer.cc
+++ b/compiler/debug/elf_debug_writer.cc
@@ -44,13 +44,12 @@ using ElfRuntimeTypes = std::conditional<sizeof(void*) == 4, ElfTypes32, ElfType
template <typename ElfTypes>
void WriteDebugInfo(linker::ElfBuilder<ElfTypes>* builder,
- const DebugInfo& debug_info,
- bool write_oat_patches) {
+ const DebugInfo& debug_info) {
// Write .strtab and .symtab.
WriteDebugSymbols(builder, /* mini-debug-info= */ false, debug_info);
// Write .debug_frame.
- WriteCFISection(builder, debug_info.compiled_methods, write_oat_patches);
+ WriteCFISection(builder, debug_info.compiled_methods);
// Group the methods into compilation units based on class.
std::unordered_map<const dex::ClassDef*, ElfCompilationUnit> class_to_compilation_unit;
@@ -95,7 +94,7 @@ void WriteDebugInfo(linker::ElfBuilder<ElfTypes>* builder,
for (auto& compilation_unit : compilation_units) {
line_writer.WriteCompilationUnit(compilation_unit);
}
- line_writer.End(write_oat_patches);
+ line_writer.End();
}
// Write .debug_info section.
@@ -106,7 +105,7 @@ void WriteDebugInfo(linker::ElfBuilder<ElfTypes>* builder,
ElfCompilationUnitWriter<ElfTypes> cu_writer(&info_writer);
cu_writer.Write(compilation_unit);
}
- info_writer.End(write_oat_patches);
+ info_writer.End();
}
}
@@ -136,7 +135,7 @@ static std::vector<uint8_t> MakeMiniDebugInfoInternal(
WriteDebugSymbols(builder.get(), /* mini-debug-info= */ true, debug_info);
}
if (!debug_info.compiled_methods.empty()) {
- WriteCFISection(builder.get(), debug_info.compiled_methods, /* write_oat_patches= */ false);
+ WriteCFISection(builder.get(), debug_info.compiled_methods);
}
builder->End();
CHECK(builder->Good());
@@ -195,9 +194,9 @@ std::vector<uint8_t> MakeElfFileForJIT(
// The compression is great help for multiple methods but it is not worth it for a
// single method due to the overheads so skip the compression here for performance.
WriteDebugSymbols(builder.get(), /* mini-debug-info= */ true, debug_info);
- WriteCFISection(builder.get(), debug_info.compiled_methods, /* write_oat_patches= */ false);
+ WriteCFISection(builder.get(), debug_info.compiled_methods);
} else {
- WriteDebugInfo(builder.get(), debug_info, /* write_oat_patches= */ false);
+ WriteDebugInfo(builder.get(), debug_info);
}
builder->End();
CHECK(builder->Good());
@@ -284,14 +283,11 @@ std::vector<uint8_t> PackElfFileForJIT(
return;
}
dwarf::WriteFDE(is64bit,
- /*section_address=*/ 0,
- /*cie_address=*/ 0,
+ /* cie_pointer= */ 0,
addr,
size,
opcodes,
- debug_frame_buffer.size(),
- &debug_frame_buffer,
- /*patch_locations=*/ nullptr);
+ &debug_frame_buffer);
});
}
strtab->End();
@@ -360,7 +356,7 @@ std::vector<uint8_t> WriteDebugElfFileForClasses(
info_writer.Start();
ElfCompilationUnitWriter<ElfTypes> cu_writer(&info_writer);
cu_writer.Write(types);
- info_writer.End(/* write_oat_patches= */ false);
+ info_writer.End();
builder->End();
CHECK(builder->Good());
@@ -370,12 +366,10 @@ std::vector<uint8_t> WriteDebugElfFileForClasses(
// Explicit instantiations
template void WriteDebugInfo<ElfTypes32>(
linker::ElfBuilder<ElfTypes32>* builder,
- const DebugInfo& debug_info,
- bool write_oat_patches);
+ const DebugInfo& debug_info);
template void WriteDebugInfo<ElfTypes64>(
linker::ElfBuilder<ElfTypes64>* builder,
- const DebugInfo& debug_info,
- bool write_oat_patches);
+ const DebugInfo& debug_info);
} // namespace debug
} // namespace art