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
This includes removing the map_info.c source and replacing it with the
BacktraceMap class to handle all map related code.
Change all callers of libbacktrace map functionality.
Also modify the corkscrew thread code so that it doesn't need to build
the map twice (once in the corkscrew format and once in the libbacktrace
format).
Change-Id: I32865a39f83a3dd6f958fc03c2759ba47d12382e
Use the libbacktrace C++ interface instead of the C interface in debuggerd.
Reformat the debuggerd code to be closer to Google C++ style.
Fix all debuggerd casts to be C++ casts.
Add a frame number to the frame data structure for ease of formatting and
add another FormatFrameData function.
Change the format_test to use the new FormatFrameData function.
Modify all of the backtrace_test to use the C++ interface.
Change-Id: I10e1610861acf7f4a3ad53276b74971cfbfda464
Use a bit better name for this. The other name was a bit confusing.
Change-Id: I1261f2ee3854a9c8b82133ad0bfbbbe48b43c9ac
(cherry picked from commit 242b1a8c7a)
Conflicts:
libbacktrace/Backtrace.cpp
Allow the use of the same map info to be shared when getting information on
multiple threads from the same pid.
Change-Id: I2e460e20154a10f4894ae563331fb32179e4551f
Remove the mips ucontext definition, there is no need for it any more.
Fix the mips/x86 ucontext copy code to copy the entire uc_mcontext data
across.
Fix a potential memory leak too.
Change-Id: I4272022da5281ed881e2d59a3e19e7f33c01aceb
We're seeing major stack trace generation performance
regression and want to find out whether it's libunwind.
Bug: 12181612
Change-Id: I3866ea956859f5cbdfe4f1ee6f20a2b6d39962c4
In order to be explicit in the Backtrace::Create() calls, adding a couple
of defines and some comments to describe what they mean.
Change-Id: I6ad08c529791821496a95fa33cea1c95b0a7eada
Included in minor fix ups is the addition of a warning macro to replace
all of the ALOGW calls.
Fix a race where multiple threads could be attempting to unwind the threads
of the current process at the same time.
Bug: 8410085
Change-Id: I02a65dc778dde690e5f95fc8ff069a32d0832fd1
The old code was essentially trying to be C++ in C and was awkward. This
change makes it all objects with a thin layer that C code can use.
There is a C++ backtrace object that is not very useful, this code will
replace it.
This change also includes moving the backtrace test to a gtest, and adding
coverage of all major functionality.
Bug: 8410085
Change-Id: Iae0f1b09b3dd60395f71ed66010c1ea5cdd37841
- Add a wait for stop to backtrace_test. There is a possible race
condition that is exposed when using libunwind.
- Fix a few calls to unwind function calls.
Bug: 8410085
Change-Id: I7487d687f6d4b7b05b8a96ad1c5f7183681e5c95
This library will be used to abstract away getting backtrace
data from how it is implemented. This is the first step to
replacing libcorkscrew with libunwind.
Bug: 8410085
Change-Id: Ie8f159e96a055d378e1ddc72d40239fba4cf52b7