android_system_core/libbacktrace
Christopher Ferris a09c4a6ff2 Fix offsets when shared lib split across maps.
The linker was modified so that a shared library has a read-only
map, then a read-execute map to represent the whole shared library.
When backtraces are created, then the offsets are set incorrectly
for backtraces. For example, all backtraces wind up with an offset now,
and a shared library loaded out of an apk shows the wrong offset.

Changes:
- Fix the FormatFrame function which was putting the offset before the
  map name.
- Refactor the Maps and MapInfo classes to keep track of the previous map
  instead of all maps. This was the only map that was ever needed.
- Modify the unwind_for_offline tool to capture both the read-only and
  read-execute map when using the read-only segment option.

Bug: 120981155

Test: Updated unit tests pass.
Test: Unwinds on device don't show the offsets everywhere any more.
Change-Id: I75b3727221be9c20316dfdcd7a1c6d242d7ce948
2018-12-18 11:22:14 -08:00
..
include/backtrace Revert^2 "Prepare to fail in RefBase destructor if count is untouched" 2018-08-08 16:30:12 -07:00
testdata Use new unwinder for offline in libbacktrace. 2018-01-29 10:41:11 -08:00
.clang-format
Android.bp Implement support for linker rosegment option. 2018-10-03 20:48:45 -07:00
Backtrace.cpp Move libbacktrace off cutils. 2018-07-11 13:55:07 -07:00
BacktraceAsyncSafeLog.h
BacktraceCurrent.cpp [libbacktrace] Fix sign-compare warning 2018-12-17 12:51:36 -08:00
BacktraceCurrent.h Use new unwinder for offline in libbacktrace. 2018-01-29 10:41:11 -08:00
BacktraceLog.h
BacktraceMap.cpp Move libbacktrace off cutils. 2018-07-11 13:55:07 -07:00
BacktracePtrace.cpp Move libbacktrace off cutils. 2018-07-11 13:55:07 -07:00
BacktracePtrace.h
BacktraceTest.h Load libbacktrace_test.so explicitly. 2018-10-03 12:42:38 -07:00
OWNERS
ThreadEntry.cpp
ThreadEntry.h
UnwindMap.cpp
UnwindMap.h
UnwindStack.cpp Fix offsets when shared lib split across maps. 2018-12-18 11:22:14 -08:00
UnwindStack.h Use new unwinder for offline in libbacktrace. 2018-01-29 10:41:11 -08:00
UnwindStackMap.cpp Verify that the elf matches the expected arch. 2018-10-29 18:08:09 -07:00
UnwindStackMap.h Verify that the elf matches the expected arch. 2018-10-29 18:08:09 -07:00
backtrace_benchmarks.cpp bionic supplies PR_SET_VMA now. 2018-08-22 12:06:20 -07:00
backtrace_offline_test.cpp Load libbacktrace_test.so explicitly. 2018-10-03 12:42:38 -07:00
backtrace_read_benchmarks.cpp
backtrace_test.cpp Load libbacktrace_test.so explicitly. 2018-10-03 12:42:38 -07:00
backtrace_testlib.cpp Use new unwinder for offline in libbacktrace. 2018-01-29 10:41:11 -08:00
backtrace_testlib.h Use new unwinder for offline in libbacktrace. 2018-01-29 10:41:11 -08:00