summaryrefslogtreecommitdiffstats
path: root/libbacktrace/UnwindStack.h
Commit message (Collapse)AuthorAgeFilesLines
* Use new unwinder for offline in libbacktrace.Christopher Ferris2018-01-291-3/+19
| | | | | | | | | | | | | libbbacktrace changes: - Completely rewrite the BacktraceOffline class to use the new unwinder. - Modify the test data to save ucontext_t data instead of unw_context data. - Convert the previous tests from unw_context data to ucontext_t data. Bug: 65682279 Test: New unit tests pass in libunwindstack. Test: All offline tests continue to pass. Change-Id: I540345c304b20199d46deeb0349a0638a0f3ab2f
* Change all uintptr_t to uint64_t in API.Christopher Ferris2018-01-181-3/+3
| | | | | | | | | | | | | | | | | 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
* Add method to detect remote read function to use.Christopher Ferris2017-12-071-0/+5
| | | | | | | | | | | | | | | | | | | | | The process_vm_read function is much faster than ptrace, but sometimes that will not work on a remote process. Modify the libunwindstack MemoryRemote object to figure out which one it can use. Wrote new unit test to verify this checking behavior. Modify libbacktrace so that the read from libunwind is used instead of using the default ptrace calls. Add some benchmarks to libbacktrace to compare the two different methods. Test: Ran unit tests libbacktrace/libunwindstack/debuggerd. Test: Ran debuggerd -b <SYSTEM_SERVER_PID> Test: Ran debuggerd -b <MEDIACODEC PID> Test: Ran debuggerd -b <RANDOM_PID> Test: Used crasher to create tombstones and verified stack data is Test: dumped properly. Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
* Add a method to share the process memory object.Christopher Ferris2017-09-051-6/+0
| | | | | | | | | | | | | | | | | | | | | New function to create the process memory object. This allows for a future where different remote process memory objects could be created depending on the way remote memory can be created. Even different local memory objects that access memory without doing any checks. It also allows MemoryRange objects to share one single process memory object and could help if the process memory object caches data. Small changes to MapInfo::CreateMemory to when some errors are detected. - Always check if the map is a device map, instead of only if the name is not empty. - Check if a memory map is readable before creating the memory from process memory. Bug: 23762183 Test: Ran unit tests, unwound on device using the new code. Change-Id: I12a93c2dc19639689a528ec41c67bfac74d431b3
* Add support for the new unwind method.Christopher Ferris2017-08-031-0/+56
| | | | | | | | | | | | | | | Also add a comment to the GetElf function to indicate that it never returns nullptr. Also needed to add this library to the a million and one places that the vndk has hard-coded this data. Bug: 23762183 Test: Built, nothing uses the new code. Test: However, I did run backtrace_test using this code, and all tests pass. Change-Id: Ib270665dcb7a7607075e36d88be76dbde6e2faa8 (cherry picked from commit dc4104b720c7fd2014ccfa9fa621d02df58a43c4)
* Revert "Add support for the new unwind method."Christopher Ferris2017-08-021-56/+0
| | | | | | | | This reverts commit 5b460d13a4c383fa6c9a416d64502430ab065209. Reason for revert: Strange sailfish boot problem. Change-Id: Ibde9375405cca4343c262335647dac120aab4d73
* Add support for the new unwind method.Christopher Ferris2017-07-311-0/+56
Also add a comment to the GetElf function to indicate that it never returns nullptr. Bug: 23762183 Test: Built, nothing uses the new code. Test: However, I did run backtrace_test using this code, and all tests pass. Change-Id: I252b9c2497e2d3d94347dd6e506170bf50cbfe16