diff options
| author | 2017-09-01 13:35:26 +0100 | |
|---|---|---|
| committer | 2017-09-18 16:53:30 +0100 | |
| commit | 1b404a8b34f6fa80342955cb0a61673503328b51 (patch) | |
| tree | df0d83903e77c55dcb476a19961ea9cccc13e616 /compiler/debug/elf_debug_writer.cc | |
| parent | fe712a8b9c247d66df013f2b4b6faa6009d745bb (diff) | |
Add debug info for link-time generated thunks.
Add debug info for method call thunks (currently unused) and
Baker read barrier thunks. Refactor debug info generation
for trampolines and record their sizes; change their names
to start with upper-case letters, so that they can be easily
generated as `#fn_name`.
This improved debug info must be generated by `dex2oat -g`,
the debug info generated by `oatdump --symbolize` remains
the same as before, except for the renamed trampolines and
an adjustment for "code delta", i.e. the Thumb mode bit.
Cortex-A53 erratum 843419 workaround thunks are not covered
by this CL.
Test: Manual; run-test --gdb -Xcompiler-option -g 160, pull
symbols for gdbclient, break in the introspection
entrypoint, check that gdb knows the new symbols
(and disassembles them) and `backtrace` works when
setting $pc to an address in the thunk.
Bug: 36141117
Change-Id: Id224b72cfa7a0628799c7db65e66e24c8517aabf
Diffstat (limited to 'compiler/debug/elf_debug_writer.cc')
| -rw-r--r-- | compiler/debug/elf_debug_writer.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc index 7fa6e146c5..16e73b0824 100644 --- a/compiler/debug/elf_debug_writer.cc +++ b/compiler/debug/elf_debug_writer.cc @@ -174,31 +174,6 @@ std::vector<uint8_t> WriteDebugElfFileForClasses(InstructionSet isa, } } -std::vector<MethodDebugInfo> MakeTrampolineInfos(const OatHeader& header) { - std::map<const char*, uint32_t> trampolines = { - { "interpreterToInterpreterBridge", header.GetInterpreterToInterpreterBridgeOffset() }, - { "interpreterToCompiledCodeBridge", header.GetInterpreterToCompiledCodeBridgeOffset() }, - { "jniDlsymLookup", header.GetJniDlsymLookupOffset() }, - { "quickGenericJniTrampoline", header.GetQuickGenericJniTrampolineOffset() }, - { "quickImtConflictTrampoline", header.GetQuickImtConflictTrampolineOffset() }, - { "quickResolutionTrampoline", header.GetQuickResolutionTrampolineOffset() }, - { "quickToInterpreterBridge", header.GetQuickToInterpreterBridgeOffset() }, - }; - std::vector<MethodDebugInfo> result; - for (const auto& it : trampolines) { - if (it.second != 0) { - MethodDebugInfo info = MethodDebugInfo(); - info.trampoline_name = it.first; - info.isa = header.GetInstructionSet(); - info.is_code_address_text_relative = true; - info.code_address = it.second - header.GetExecutableOffset(); - info.code_size = 0; // The symbol lasts until the next symbol. - result.push_back(std::move(info)); - } - } - return result; -} - // Explicit instantiations template void WriteDebugInfo<ElfTypes32>( ElfBuilder<ElfTypes32>* builder, |