History log of /system/core/libbacktrace/UnwindMap.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7937a36c8e24ef2dc5105a2a6b67f395934b2e2f 18-Jan-2018 Christopher Ferris <cferris@google.com> Change all uintptr_t to uint64_t in API.

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
/system/core/libbacktrace/UnwindMap.h
82f3bbdc25253ee299207acd22b074bbe39bf2c6 14-Mar-2017 Christopher Ferris <cferris@google.com> Allow calling GetFunctionName before unwinding.

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
/system/core/libbacktrace/UnwindMap.h
034c475931e8e4da54b499c0056121490f029865 12-Jul-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in system/core.

* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.

Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
/system/core/libbacktrace/UnwindMap.h
3a14004c7f521cf2ca6dfea182fa7441e77c97e7 16-Jun-2016 Christopher Ferris <cferris@google.com> Fix race condition updating local map data.

If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
/system/core/libbacktrace/UnwindMap.h
d4c884330c384bbb06f9a0d1fee2d2ae2086521c 05-Feb-2016 Christopher Ferris <cferris@google.com> Fix use of uninitialized memory.

When creating an UnwindMapLocal fails in the Build() function call,
the destructor for UnwindMap is called. Unfortunately, the map_cursor_
member variable has not been initialized, so the call to destroy it
winds up operating on garbage data.

Part of this is a result of a bad class hierarchy, so this refactors
the classes slightly, and properly initializes the map_cursor_ member
variable in the base class.

Bug: 26931578
Change-Id: I885596bf65e4ef63559cee2c56cd41576d5ecc1b
/system/core/libbacktrace/UnwindMap.h
2c43cff01d1271be451671567955158629b23670 27-Mar-2015 Christopher Ferris <cferris@google.com> Refactor the code.

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
/system/core/libbacktrace/UnwindMap.h
12385e3ad085aa1ac06c26529b32b688503a9fcf 06-Feb-2015 Christopher Ferris <cferris@google.com> Move map data into backtrace data proper.

The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
/system/core/libbacktrace/UnwindMap.h
e29609106033a48a6128664668d22bf4fb42a7ee 08-Mar-2014 Christopher Ferris <cferris@google.com> Create an UnwindMapLocal object.

The way libunwind handles local unwinds is different from remote unwinds,
so create a new map object to handle the differences.

Add new test to verify the map data is being generated correctly.

Add new tests to check for leaks.

Refactor the BACK_LOGW code into a single header file.

Change-Id: I01f3cbfc4b927646174ea1b614fa25d23b9b3427
/system/core/libbacktrace/UnwindMap.h
df2906186b6952c57b1f662bfef0b65c9f8c2e0d 23-Jan-2014 Christopher Ferris <cferris@google.com> Re-enable libunwind for arm.

Update to handle the new optimized way that libunwind works.

In addition, a small refactor of the BacktraceMap code.

A few new tests of for good measure.

Change-Id: I2f9b4f5ad5a0dfe907b31febee76e4b9b94fb76f
/system/core/libbacktrace/UnwindMap.h