In order to support the offline unwinding properly, get rid of the
usage of non-fixed type uintptr_t from all API calls.
In addition, completely remove the old local and remote unwinding code
that used libunwind.
The next step will be to move the offline unwinding to the new unwinder.
Bug: 65682279
Test: Ran unit tests for libbacktrace/debuggerd.
Test: Ran debuggerd -b on a few arm and arm64 processes.
Test: Ran crasher and crasher64 and verified tombstones look correct.
Change-Id: Ib0c6cee3ad6785a102b74908a3d8e5e93e5c6b33
The process_vm_read function is much faster than ptrace, but sometimes
that will not work on a remote process. Modify the libunwindstack
MemoryRemote object to figure out which one it can use.
Wrote new unit test to verify this checking behavior.
Modify libbacktrace so that the read from libunwind is used instead of
using the default ptrace calls.
Add some benchmarks to libbacktrace to compare the two different methods.
Test: Ran unit tests libbacktrace/libunwindstack/debuggerd.
Test: Ran debuggerd -b <SYSTEM_SERVER_PID>
Test: Ran debuggerd -b <MEDIACODEC PID>
Test: Ran debuggerd -b <RANDOM_PID>
Test: Used crasher to create tombstones and verified stack data is
Test: dumped properly.
Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
Some extra initialization needs to occur before calling the local/remote
GetFunctioneName.
Also, cleanup the test code a bit:
- Make all local functions static.
- Create a common function to create and finish remote processes.
- Remove unused function.
- Fix the formatting a bit by making it match clang format.
Test: Ran the unit tests.
Change-Id: I998bed1378d582df59fdf9263df6f208db5d795a
The object hierarchy was confusing and convoluted. This removes
a lot of unnecessary code, and consolidates the BacktraceCurrent
and BacktraceThread code into BacktraceCurrent.
Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae