summaryrefslogtreecommitdiffstats
path: root/include/backtrace
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "Revert "Revert "Add BacktraceOffline for offline ↵Yabin Cui2015-09-222-0/+17
| | | | | | | | backtracing."""" This reverts commit 94ece83270deca76c69f5755f8c0ff5c859341fd. Change-Id: Ie06465c89a5fc115517130f9f2904cc855973155
* Revert "Revert "Revert "Add BacktraceOffline for offline backtracing."""Yabin Cui2015-09-222-17/+0
| | | | | | This reverts commit 0a411c934a81e5c77a27ef5b69d391038f36e969. Change-Id: Ic1824afac6c32f1087b66de9d6368a561f235d13
* Revert "Revert "Add BacktraceOffline for offline backtracing.""Yabin Cui2015-09-212-0/+17
| | | | | | | | | | | This reverts commit ab5e583327e4dfd9f7c38ab6ed4c4714508ce544. And statically link llvm libraries on host to remove dependency on 32-bit llvm shared library which is not included in the prebuilt. Bug: 22229391 Change-Id: I8210687655ee1809fd820ab2a6ca5dfaf3f9096d
* Revert "Add BacktraceOffline for offline backtracing."Yabin Cui2015-09-172-17/+0
| | | | | | | | Using llvm makes libbacktrace stops building for 32 bit on linux host x86_64. This reverts commit c9c6b6ee7735f014771d81615c0278b53d14f61c. Change-Id: Ieb807db881d7bb3132cd09e25fd08c28766ca0a8
* Add BacktraceOffline for offline backtracing.Yabin Cui2015-09-162-0/+17
| | | | | | | It is used by simpeleprf for stack unwinding. Bug: 22229391 Change-Id: I26d698610ccdc9545da837bc5a8a9ec787f27a6b
* Change the 64 bit map address format.Christopher Ferris2015-06-031-7/+5
| | | | | | | | | | | | | | Previously, the map printing in tombstones for 64 bit devices uses a variable length value. This means that the maps are not lined up. The new format is to print the map as 00000000'00000000 in all ways. Also fix a bug where the backtrace_map_t did not initialize all parameters. Add unit tests for all of the dump_all_maps function. Bug: 20950813 Change-Id: I30901c8a0251b00d85c4c01476b033ef8db84e32
* Add offset to map data.Christopher Ferris2015-05-061-0/+1
| | | | | | | Also, print the offset in the maps section. Bug: 20864928 Change-Id: I71f005726e5ef73cf75bbcb8f829fd5127cb9d61
* Add load base to map for relocation packing.Christopher Ferris2015-05-011-0/+9
| | | | | | | | | | | | The new linker relocation packing support uses non-zero load bases, so we better handle them properly. Also print out the load base for a map if it's non-zero. Bug: 20687795 (cherry picked from commit 329ed7dae49eba09bdf865dd999d1a7e73bb9687) Change-Id: Ibc37d8c8bb032820dca4e7531184349ba6d402d2
* Refactor the code.Christopher Ferris2015-03-311-12/+9
| | | | | | | | 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
* Add variable length read to Backtrace.Christopher Ferris2015-03-171-0/+6
| | | | | | | | | | Included tests for this new feature. Changed the NULLs to nullptr in backtrace_test. Changed UniquePtr to std::unique_ptr in backtrace_test. Change-Id: I92375465b8f8ba84589834cc162db5915bf1be81
* Move map data into backtrace data proper.Christopher Ferris2015-02-062-8/+15
| | | | | | | | | | | 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
* Allow getting an uncached process map.Christopher Ferris2014-08-041-1/+4
| | | | | | (cherry picked from commit f02593b0e61f8108449770094caa7bb39a646ec1) Change-Id: I2012bf2dc553ebc663345b9eac6d794e80df9c00
* Add missing headersDan Albert2014-05-211-0/+1
| | | | | | | These headers are needed for pid_t and free when using libc++ headers (POSIX does not require that the symbols be exposed with the previous includes). Change-Id: Ia51a4fdfdbae7377130a43c401c2d8d241671d1e
* Fix ucontext_t forward declare for mac.Christopher Ferris2014-05-091-0/+5
| | | | Change-Id: I30470f5cc25553dee25d4858f64ec5af13aa20c9
* Fix mac build.Christopher Ferris2014-05-091-1/+3
| | | | | | | Forward declare ucontext_t so that it's not necessary for ucontext.h to be included in the global header. Change-Id: Ic13677dd572ab1acd927f0a17b284f9b417a642f
* Rewrite unwind thread handling.Christopher Ferris2014-05-081-1/+2
| | | | | | | | | | | | | | | | | | This new version doesn't require any specialized thread implementation, it uses the Current implementation to do its job. In addition, it runs much faster when multiple threads are trying to unwind at the same time since the global signal lock is held for only a small amount of time. Even running through the threads one at a time should be faster since it no longer requires two passes through the unwound stacks. The new code now allows multiple simultaneous unwinds of the same thread. Finally, add the ability to unwind from a ucontext_t passed in. This functionality doesn't work for remote unwinds yet. Change-Id: I4d181d7ca5ffd2acfd1686e668e6d21e36b425cb
* Create an UnwindMapLocal object.Christopher Ferris2014-04-031-1/+1
| | | | | | | | | | | | | 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
* LP64: Enable debuggerd/libbacktrace/libunwind.Pavel Chupin2014-01-301-2/+11
| | | | | Change-Id: I2e432839f86c33c2adbaac8cc12ca8961956044b Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* Re-enable libunwind for arm.Christopher Ferris2014-01-282-9/+8
| | | | | | | | | | 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
* Add PROT_* constants not found on windows.Christopher Ferris2014-01-171-0/+8
| | | | Change-Id: Ic515363ed66dfb2d8e1a6fdfa274508b3a91311d
* Rewrite libbacktrace to be all C++.Christopher Ferris2014-01-164-156/+149
| | | | | | | | | | | | | 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
* Next phase of the move, reformat use C++ features.Christopher Ferris2014-01-132-0/+9
| | | | | | | | | | | | | | | | | 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
* Move BACKTRACE_NO_TID to BACKTRACE_CURRENT_THREAD.Christopher Ferris2014-01-091-2/+2
| | | | | | | | | | | Use a bit better name for this. The other name was a bit confusing. Change-Id: I1261f2ee3854a9c8b82133ad0bfbbbe48b43c9ac (cherry picked from commit 242b1a8c7a5ec73172bac811e51acbc27201f22c) Conflicts: libbacktrace/Backtrace.cpp
* Refactor to share map_info amongst threads.Christopher Ferris2014-01-082-2/+14
| | | | | | | Allow the use of the same map info to be shared when getting information on multiple threads from the same pid. Change-Id: I2e460e20154a10f4894ae563331fb32179e4551f
* Fix include files in backtrace.h.Christopher Ferris2013-11-061-2/+2
| | | | | | (cherry picked from commit 08932582226456b8789b52c28462e2224dfcc2e4) Change-Id: I37a78a9472b94ae84a84d871bfa9a070ff882699
* Add some clarifying defines.Christopher Ferris2013-11-051-0/+8
| | | | | | | 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
* More libbacktrace fixes.Christopher Ferris2013-10-301-11/+12
| | | | | | | | | | | | 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
* Rewrite libbacktrace using C++.Christopher Ferris2013-10-282-25/+120
| | | | | | | | | | | | | | 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
* Update comment from review.Christopher Ferris2013-09-301-1/+1
| | | | | | | Missed this typo that enh pointed out. Bug: 8410085 Change-Id: Ic636ae218fc153bc5e3b1a0fdc2f7161980e5eec
* Create a single backtrace library.Christopher Ferris2013-09-281-0/+104
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