From fe736b775c7774bb2f7072e022099ca47dd21a3c Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Wed, 9 Mar 2016 11:44:44 +0000 Subject: Allow generation of native debug info for multiple methods. Slight tweak in the API which I will need in the near future. Change-Id: I45954ae16710bc941a9a06a3a17c70798315ca53 --- compiler/debug/elf_debug_writer.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'compiler/debug/elf_debug_writer.cc') 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 MakeMiniDebugInfo( } template -static ArrayRef WriteDebugElfFileForMethodInternal( - const InstructionSet isa, +static ArrayRef WriteDebugElfFileForMethodsInternal( + InstructionSet isa, const InstructionSetFeatures* features, - const MethodDebugInfo& method_info) { + const ArrayRef& method_infos) { std::vector buffer; buffer.reserve(KB); VectorOutputStream out("Debug ELF file", &buffer); @@ -125,7 +125,7 @@ static ArrayRef 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(&method_info, 1), + method_infos, dwarf::DW_DEBUG_FRAME_FORMAT, false /* write_oat_patches */); builder->End(); @@ -137,19 +137,20 @@ static ArrayRef WriteDebugElfFileForMethodInternal( return ArrayRef(result, buffer.size()); } -ArrayRef WriteDebugElfFileForMethod(const InstructionSet isa, - const InstructionSetFeatures* features, - const MethodDebugInfo& method_info) { +ArrayRef WriteDebugElfFileForMethods( + InstructionSet isa, + const InstructionSetFeatures* features, + const ArrayRef& method_infos) { if (Is64BitInstructionSet(isa)) { - return WriteDebugElfFileForMethodInternal(isa, features, method_info); + return WriteDebugElfFileForMethodsInternal(isa, features, method_infos); } else { - return WriteDebugElfFileForMethodInternal(isa, features, method_info); + return WriteDebugElfFileForMethodsInternal(isa, features, method_infos); } } template static ArrayRef WriteDebugElfFileForClassesInternal( - const InstructionSet isa, + InstructionSet isa, const InstructionSetFeatures* features, const ArrayRef& types) SHARED_REQUIRES(Locks::mutator_lock_) { @@ -174,7 +175,7 @@ static ArrayRef WriteDebugElfFileForClassesInternal( return ArrayRef(result, buffer.size()); } -ArrayRef WriteDebugElfFileForClasses(const InstructionSet isa, +ArrayRef WriteDebugElfFileForClasses(InstructionSet isa, const InstructionSetFeatures* features, const ArrayRef& types) { if (Is64BitInstructionSet(isa)) { -- cgit v1.2.3-59-g8ed1b