From e09b87eb8d8c063ddaee53a70b4bc8dbf61ff66c Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Mon, 19 Aug 2019 21:31:31 +0100 Subject: JIT mini-debug-info: Support JIT data dual mapping. Ensure that we can add/remove mini-debug-info if the JIT data is read-only and we need to use the other mapping for writes. Pointers into the read-only memory are marked as "const". Test: "test.py -b --host --jit" with data dual mapping Test: device boots with data dual mapping Bug: 119800099 Change-Id: I9399cffbe5ae13f08f698ab1598c30f13545a767 --- compiler/debug/elf_debug_writer.cc | 4 ++-- compiler/debug/elf_debug_writer.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/debug') diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc index cf7254b105..79d11982ab 100644 --- a/compiler/debug/elf_debug_writer.cc +++ b/compiler/debug/elf_debug_writer.cc @@ -228,7 +228,7 @@ std::vector MakeElfFileForJIT( // Combine several mini-debug-info ELF files into one, while filtering some symbols. std::vector PackElfFileForJIT( - ArrayRef jit_entries, + ArrayRef jit_entries, ArrayRef removed_symbols, bool compress, /*out*/ size_t* num_symbols) { @@ -260,7 +260,7 @@ std::vector PackElfFileForJIT( using Reader = ElfDebugReader; std::deque readers; - for (JITCodeEntry* it : jit_entries) { + for (const JITCodeEntry* it : jit_entries) { readers.emplace_back(GetJITCodeEntrySymFile(it)); } diff --git a/compiler/debug/elf_debug_writer.h b/compiler/debug/elf_debug_writer.h index ed43a0b702..1ce3c6f6f8 100644 --- a/compiler/debug/elf_debug_writer.h +++ b/compiler/debug/elf_debug_writer.h @@ -57,7 +57,7 @@ std::vector MakeElfFileForJIT( const MethodDebugInfo& method_info); std::vector PackElfFileForJIT( - ArrayRef jit_entries, + ArrayRef jit_entries, ArrayRef removed_symbols, bool compress, /*out*/ size_t* num_symbols); -- cgit v1.2.3-59-g8ed1b