From 1b404a8b34f6fa80342955cb0a61673503328b51 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 1 Sep 2017 13:35:26 +0100 Subject: 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 --- compiler/linker/relative_patcher.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/linker/relative_patcher.h') diff --git a/compiler/linker/relative_patcher.h b/compiler/linker/relative_patcher.h index 38c8228422..53a096627f 100644 --- a/compiler/linker/relative_patcher.h +++ b/compiler/linker/relative_patcher.h @@ -31,6 +31,10 @@ class CompiledMethod; class LinkerPatch; class OutputStream; +namespace debug { +struct MethodDebugInfo; +} // namespace debug + namespace linker { /** @@ -114,6 +118,9 @@ class RelativePatcher { const LinkerPatch& patch, uint32_t patch_offset) = 0; + virtual std::vector GenerateThunkDebugInfo( + uint32_t executable_offset) = 0; + protected: RelativePatcher() : size_code_alignment_(0u), -- cgit v1.2.3-59-g8ed1b