diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/debug/elf_debug_info_writer.h | 6 | ||||
| -rw-r--r-- | compiler/debug/elf_debug_line_writer.h | 5 | ||||
| -rw-r--r-- | compiler/optimizing/instruction_builder.cc | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/compiler/debug/elf_debug_info_writer.h b/compiler/debug/elf_debug_info_writer.h index 37c2d32091..d5999941d7 100644 --- a/compiler/debug/elf_debug_info_writer.h +++ b/compiler/debug/elf_debug_info_writer.h @@ -35,6 +35,7 @@ #include "mirror/array.h" #include "mirror/class-inl.h" #include "mirror/class.h" +#include "oat_file.h" namespace art { namespace debug { @@ -49,7 +50,8 @@ static std::vector<const char*> GetParamNames(const MethodDebugInfo* mi) { std::vector<const char*> names; if (mi->code_item != nullptr) { DCHECK(mi->dex_file != nullptr); - const uint8_t* stream = mi->dex_file->GetDebugInfoStream(mi->code_item); + uint32_t debug_info_offset = OatFile::GetDebugInfoOffset(*mi->dex_file, mi->code_item); + const uint8_t* stream = mi->dex_file->GetDebugInfoStream(debug_info_offset); if (stream != nullptr) { DecodeUnsignedLeb128(&stream); // line. uint32_t parameters_size = DecodeUnsignedLeb128(&stream); @@ -257,7 +259,9 @@ class ElfCompilationUnitWriter { // Write local variables. LocalInfos local_infos; + uint32_t debug_info_offset = OatFile::GetDebugInfoOffset(*dex, dex_code); if (dex->DecodeDebugLocalInfo(dex_code, + debug_info_offset, is_static, mi->dex_method_index, LocalInfoCallback, diff --git a/compiler/debug/elf_debug_line_writer.h b/compiler/debug/elf_debug_line_writer.h index 6e72b46174..943e03a765 100644 --- a/compiler/debug/elf_debug_line_writer.h +++ b/compiler/debug/elf_debug_line_writer.h @@ -26,6 +26,7 @@ #include "debug/src_map_elem.h" #include "dex_file-inl.h" #include "linker/elf_builder.h" +#include "oat_file.h" #include "stack_map.h" namespace art { @@ -158,7 +159,9 @@ class ElfDebugLineWriter { PositionInfos dex2line_map; DCHECK(mi->dex_file != nullptr); const DexFile* dex = mi->dex_file; - if (!dex->DecodeDebugPositionInfo(mi->code_item, PositionInfoCallback, &dex2line_map)) { + uint32_t debug_info_offset = OatFile::GetDebugInfoOffset(*dex, mi->code_item); + if (!dex->DecodeDebugPositionInfo( + mi->code_item, debug_info_offset, PositionInfoCallback, &dex2line_map)) { continue; } diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 61840cc20f..978d0c2225 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -29,6 +29,7 @@ #include "driver/compiler_options.h" #include "imtable-inl.h" #include "mirror/dex_cache.h" +#include "oat_file.h" #include "optimizing_compiler_stats.h" #include "quicken_info.h" #include "scoped_thread_state_change-inl.h" @@ -447,7 +448,8 @@ ArenaBitVector* HInstructionBuilder::FindNativeDebugInfoLocations() { /* expandable */ false, kArenaAllocGraphBuilder); locations->ClearAllBits(); - dex_file_->DecodeDebugPositionInfo(code_item_, Callback::Position, locations); + uint32_t debug_info_offset = OatFile::GetDebugInfoOffset(*dex_file_, code_item_); + dex_file_->DecodeDebugPositionInfo(code_item_, debug_info_offset, Callback::Position, locations); // Instruction-specific tweaks. IterationRange<DexInstructionIterator> instructions = code_item_->Instructions(); for (const DexInstructionPcPair& inst : instructions) { |