diff options
| author | Christopher Ferris <cferris@google.com> | 2018-01-17 12:59:45 -0800 |
|---|---|---|
| committer | Christopher Ferris <cferris@google.com> | 2018-01-17 19:18:00 -0800 |
| commit | 98984b41da78448df24d8d9ced842066328d5f11 (patch) | |
| tree | 642bbd79fd42f8deccf9b29b3c73b5af295ec936 /libbacktrace | |
| parent | 2c4f487dfbf1e1cce6e887bfef5e864f8222d07f (diff) | |
| download | system_core-98984b41da78448df24d8d9ced842066328d5f11.tar.gz system_core-98984b41da78448df24d8d9ced842066328d5f11.tar.bz2 system_core-98984b41da78448df24d8d9ced842066328d5f11.zip | |
Add support for getting a dex pc.
Changes:
- Change the register type from int16_t to uint32_t for the location data
and the Eval processing. This is because the special dex pc is > 65535.
- Add the ability for Dwarf register location information to point to a
register that is itself a Dwarf location register.
- Add dex_pc to the frame information.
- Modify the unwind tool to print the dex pc if non-zero.
This does not implement the printing of the dex information in anything
but the unwind tool. It's not the final form of this printing.
Bug: 72070049
Test: Ran new unit tests.
Test: Dumped stack while in interpreter running 137-cfi art test and
Test: verified dex pc is set to non-zero.
Change-Id: I6ce8a6b577fb4f92abacbd433b1f68977e272542
Diffstat (limited to 'libbacktrace')
| -rw-r--r-- | libbacktrace/UnwindStack.cpp | 1 | ||||
| -rw-r--r-- | libbacktrace/include/backtrace/Backtrace.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libbacktrace/UnwindStack.cpp b/libbacktrace/UnwindStack.cpp index b0345a140..b62ee1659 100644 --- a/libbacktrace/UnwindStack.cpp +++ b/libbacktrace/UnwindStack.cpp @@ -70,6 +70,7 @@ bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, back_frame->rel_pc = frame->rel_pc; back_frame->pc = frame->pc; back_frame->sp = frame->sp; + back_frame->dex_pc = frame->dex_pc; back_frame->func_name = demangle(frame->function_name.c_str()); back_frame->func_offset = frame->function_offset; diff --git a/libbacktrace/include/backtrace/Backtrace.h b/libbacktrace/include/backtrace/Backtrace.h index 592266429..f34fb2d5f 100644 --- a/libbacktrace/include/backtrace/Backtrace.h +++ b/libbacktrace/include/backtrace/Backtrace.h @@ -81,6 +81,7 @@ struct backtrace_frame_data_t { uintptr_t rel_pc; // The relative pc. uintptr_t sp; // The top of the stack. size_t stack_size; // The size of the stack, zero indicate an unknown stack size. + uint64_t dex_pc; // If non-zero, the Dex PC for the ART interpreter. backtrace_map_t map; // The map associated with the given pc. std::string func_name; // The function name associated with this pc, NULL if not found. uintptr_t func_offset; // pc relative to the start of the function, only valid if func_name is not NULL. |
