summaryrefslogtreecommitdiff
path: root/compiler/debug/elf_debug_writer.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2016-03-11 14:25:56 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-03-11 14:25:57 +0000
commitcc22d41d4de2514cc3cb4ed569764a35f15da48d (patch)
tree49809c99b991eece44dad9ca26c89bdcf0f9d911 /compiler/debug/elf_debug_writer.cc
parent1a008a127730710f8f56c1ca66385e1b062a2dcb (diff)
parentfe736b775c7774bb2f7072e022099ca47dd21a3c (diff)
Merge "Allow generation of native debug info for multiple methods."
Diffstat (limited to 'compiler/debug/elf_debug_writer.cc')
-rw-r--r--compiler/debug/elf_debug_writer.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc
index 4f2a007492..0ca7370f98 100644
--- a/compiler/debug/elf_debug_writer.cc
+++ b/compiler/debug/elf_debug_writer.cc
@@ -114,10 +114,10 @@ std::vector<uint8_t> MakeMiniDebugInfo(
}
template <typename ElfTypes>
-static ArrayRef<const uint8_t> WriteDebugElfFileForMethodInternal(
- const InstructionSet isa,
+static ArrayRef<const uint8_t> WriteDebugElfFileForMethodsInternal(
+ InstructionSet isa,
const InstructionSetFeatures* features,
- const MethodDebugInfo& method_info) {
+ const ArrayRef<const MethodDebugInfo>& method_infos) {
std::vector<uint8_t> buffer;
buffer.reserve(KB);
VectorOutputStream out("Debug ELF file", &buffer);
@@ -125,7 +125,7 @@ static ArrayRef<const uint8_t> WriteDebugElfFileForMethodInternal(
// No program headers since the ELF file is not linked and has no allocated sections.
builder->Start(false /* write_program_headers */);
WriteDebugInfo(builder.get(),
- ArrayRef<const MethodDebugInfo>(&method_info, 1),
+ method_infos,
dwarf::DW_DEBUG_FRAME_FORMAT,
false /* write_oat_patches */);
builder->End();
@@ -137,19 +137,20 @@ static ArrayRef<const uint8_t> WriteDebugElfFileForMethodInternal(
return ArrayRef<const uint8_t>(result, buffer.size());
}
-ArrayRef<const uint8_t> WriteDebugElfFileForMethod(const InstructionSet isa,
- const InstructionSetFeatures* features,
- const MethodDebugInfo& method_info) {
+ArrayRef<const uint8_t> WriteDebugElfFileForMethods(
+ InstructionSet isa,
+ const InstructionSetFeatures* features,
+ const ArrayRef<const MethodDebugInfo>& method_infos) {
if (Is64BitInstructionSet(isa)) {
- return WriteDebugElfFileForMethodInternal<ElfTypes64>(isa, features, method_info);
+ return WriteDebugElfFileForMethodsInternal<ElfTypes64>(isa, features, method_infos);
} else {
- return WriteDebugElfFileForMethodInternal<ElfTypes32>(isa, features, method_info);
+ return WriteDebugElfFileForMethodsInternal<ElfTypes32>(isa, features, method_infos);
}
}
template <typename ElfTypes>
static ArrayRef<const uint8_t> WriteDebugElfFileForClassesInternal(
- const InstructionSet isa,
+ InstructionSet isa,
const InstructionSetFeatures* features,
const ArrayRef<mirror::Class*>& types)
SHARED_REQUIRES(Locks::mutator_lock_) {
@@ -174,7 +175,7 @@ static ArrayRef<const uint8_t> WriteDebugElfFileForClassesInternal(
return ArrayRef<const uint8_t>(result, buffer.size());
}
-ArrayRef<const uint8_t> WriteDebugElfFileForClasses(const InstructionSet isa,
+ArrayRef<const uint8_t> WriteDebugElfFileForClasses(InstructionSet isa,
const InstructionSetFeatures* features,
const ArrayRef<mirror::Class*>& types) {
if (Is64BitInstructionSet(isa)) {