Commit graph

7 commits

Author SHA1 Message Date
Christopher Ferris
f67c6410d1 Create a bare bones host libbacktrace on mac.
This allows the libbacktrace library to compile for host on mac.

Bug: 12474939
Change-Id: I32cbcf996e6fe9057e5065ba21f89086343704a0
2014-01-13 23:57:35 -08:00
Christopher Ferris
20303f856f Next phase of the move, reformat use C++ features.
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
2014-01-13 14:21:52 -08:00
Christopher Ferris
bc12d6329e Move BACKTRACE_NO_TID to BACKTRACE_CURRENT_THREAD.
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
2014-01-09 15:49:39 -08:00
Christopher Ferris
9846497f79 Refactor to share map_info amongst threads.
Allow the use of the same map info to be shared when getting information on
multiple threads from the same pid.

Change-Id: I2e460e20154a10f4894ae563331fb32179e4551f
2014-01-08 15:32:28 -08:00
Christopher Ferris
cbfc7302fb Add some clarifying defines.
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
2013-11-05 11:05:32 -08:00
Christopher Ferris
8ed46278be More libbacktrace fixes.
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
2013-10-30 14:14:54 -07:00
Christopher Ferris
17e91d44ed Rewrite libbacktrace using C++.
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
2013-10-28 17:55:25 -07:00