summaryrefslogtreecommitdiffstats
path: root/libbacktrace/Android.bp
Commit message (Collapse)AuthorAgeFilesLines
* bpfmt.Elliott Hughes2018-02-161-7/+6
| | | | | | Bug: N/A Test: builds Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
* Fix darwin buildChristopher Tate2018-02-161-0/+3
| | | | | | | Darwin needs libbase too. Test: 'm' Change-Id: I9d50face92b7d5a4399dbcebd39d4062477b3a2c
* Move dex pc frame creation into libunwindstack.Christopher Ferris2018-01-311-6/+2
| | | | | | | | Test: Compiles, all unit tests pass. Test: Ran 137-cfi art test in interpreter and verified interpreter Test: frames still show up. Change-Id: Icea90194986faa733a873e8cf467fc2513eb5573
* Use new unwinder for offline in libbacktrace.Christopher Ferris2018-01-291-53/+2
| | | | | | | | | | | | | 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
* Add extra frame when dex_pc is non-zero.Christopher Ferris2018-01-231-0/+24
| | | | | | | | | | | | | | | Use the art dex file library to read the dex data. Add unit tests for the UnwindDexFile code. Bug: 72070049 Test: All unit tests continue to pass. Test: Dumped the backtrace of the 137-cfi test while running in interpreter Test: mode and verified that the stack trace is correct. Did this on host Test: and for arm/arm64. Change-Id: Ia6f343318c5dd6968a954015a7d59fdf101575b0
* Change all uintptr_t to uint64_t in API.Christopher Ferris2018-01-181-3/+0
| | | | | | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | 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
* libbacktrace: remove exit time destructors.Josh Gao2017-10-261-0/+4
| | | | | | | | | | | | | If libbacktrace is statically linked into a library that interposes libc, exit-time destructors can lead to a segfault upon exit if static variables are used after their destruction. Remove the one use of a static variable (with inconsequential performance impact of less than 1us per backtrace), and enable -Wexit-time-destructors to ensure this stays fixed in the future. Test: mma Change-Id: Icdaf1cf1c1f166cf501d9ecd1983c44e4305f7e9
* libbacktrace: add benchmarks for Backtrace::Create, CreateNew.Josh Gao2017-10-261-0/+1
| | | | | Test: backtrace_benchmarks Change-Id: I80ba5adb31d446314060edd00149f09e14e6815e
* Merge "libbacktrace is not directly available to vendors"Treehugger Robot2017-10-191-1/+1
|\
| * libbacktrace is not directly available to vendorsJiyong Park2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This lib becomes VNDK-SP just because libutils, which is VNDK-SP, is depending on it. Since libutils provide android::CallStack class for collecting and printing the callstack, there is no need for vendors to use the internal libbacktrace library. Thus the lib is marked as vendor_available: false. Bug: 64730695 Test: build 2017 pixel device Change-Id: I4ad91e3a6747bb0ae88d32cd26dfba32239c5b93
* | Use target.linux for all linux kernel based targetsDan Willemsen2017-10-161-31/+3
|/ | | | | | | | | | Now in Android.bp files, target.linux applies to all targets running a linux kernel (android, linux_glibc, linux_bionic). So common flags/sources/etc can be combined instead of copying them to each target. Test: m Change-Id: If7ad138ea1c540c160731f86b6ccc0daa5c69b83
* Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]Dan Willemsen2017-10-021-3/+3
| | | | | | | | | | | | | | In the future, target.linux will apply to all targets running a linux kernel (android, linux_glibc, linux_bionic). So move all current users to the specific linux_glibc. There will be another cleanup pass later that will move some instances back to target.linux if the properties should be shared with target.android and target.linux_bionic, but target.linux needs to be removed first. Test: out/soong/build.ninja identical before/after Change-Id: I72ef34689c60ce547cab2898e354b027e335f6a1 Exempt-From-Owner-Approval: build system cleanup
* Remove default librariesDan Willemsen2017-09-291-5/+0
| | | | | | | | | | libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on Linux. Test: m host Change-Id: I0b3c147b00a8ab6ff289b85db55b88836c905f5c Exempt-From-Owner-Approval: build system cleanup
* Update the tests.Christopher Ferris2017-08-281-0/+7
| | | | | | | | | | | | | - Change all load_base to load_bias in the test files. - Add the test files to the backtrace_test. - Add a function to get the path to the test libraries. - Change aarch64 to arm64 for offline test code. - Modify the offline tests so that they can be easily updated when unwinding on any arch for any other arch is possible. - Add tests of CreateNew for remote debugging. Test: Ran unit tests on host and angler. Change-Id: Id6c5afe73aeb2ac22463dd81f061799fcb1c178b
* Merge "Speed up map creation."Christopher Ferris2017-08-251-0/+14
|\
| * Speed up map creation.Christopher Ferris2017-08-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rewrite the Maps::Parse to use open, and a buffer on the stack. - Rewrite the line parser away from sscanf. The current way sscanf is used does not catch many malformed lines. In addition, this new version improves performance by 50% over sscanf on sailfish. - Add a lot of unit tests for the parser to make sure there are no problems. In addition, add a special line that was not rejected with the previous version of the code. - Add new accessor to get the map at a particular index. - Add a backtrace benchmark for map creation for both new and old. This cl results in ~5% speedup and makes the new unwinder map creation about the same for 64 bit. It's still a bit slower, but not by much. On 32 bit, we are still about 5% slower than the old creation method, though. Bug: 23762183 Test: libunwindstack unit tests pass. Ran the new benchmarks. Change-Id: Id4431e539f400984e6fad62153fdf4152d518322
* | Mark the modules as VNDK-SP in Android.bpJustin Yun2017-08-231-0/+4
|/ | | | | | | | | | | | | | | | | | | | As a VNDK-SP module, Android.bp must have 'vndk' tag as well as 'vendor_available: true'. The 'vndk' tag for VNDK-SP formated as follows: vndk: { enabled: true, support_system_process: true, }, VNDK-SP modules will be installed both in system/lib(64) as normal and in system/lib(64)/vndk-sp as a vendor variant. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Merged-In: I51fe0859f63ad58b7b91909e7d7d4206443228cd Change-Id: I51fe0859f63ad58b7b91909e7d7d4206443228cd (cherry picked from commit aeb68e86e4e335d4b201c46099cc2ce1256beec2)
* Add support for the new unwind method.Christopher Ferris2017-08-031-0/+9
| | | | | | | | | | | | | | | 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-9/+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/+9
| | | | | | | | | | | | 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
* Backtrace: Add libziparchive dependencyAndreas Gampe2017-07-041-0/+1
| | | | | | Bug: 37342627 Test: m Change-Id: I2b4155bd11b315ff49eb9a69549e1ab3678d0b28
* Use demangle for function names.Christopher Ferris2017-06-021-0/+1
| | | | | | | Bug: 62141808 Test: Ran unit tests, ran debuggerd -b on android processes. Change-Id: I40f341bcb2b35dd0a020d245d6b6f2ed2df65481
* Use async safe logging in signal handlers.Christopher Ferris2017-05-041-1/+1
| | | | | | | | Test: Boot on bullhead. Test: Ran the libbacktrace tests on bullhead. Test: Added a temporary log message in the signal handler, and ran the Test: backtrace tests. Change-Id: I0a6888c9f311af2c8cc7fbb4929315911bd2bb3c
* libutils: export libbacktrace headersSteven Moreland2017-04-281-0/+1
| | | | | | | | | | | This is used in CallStack.h. Test: m -j libutils Test: links Test: trying to compile with BOARD_VNDK_VERSION := current Bug: 33241851 Change-Id: I076c9551d356824d6e69b82349b890369bc7eea3 Merged-In: If7258e7b38000a72fd520f725030fb0038f90167
* libbacktrace: make vendor_availableSteven Moreland2017-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting vendor_available, the following may become true: * a prebuilt library from this release may be used at runtime by in a later releasse (by vendor code compiled against this release). so this library shouldn't depend on runtime state that may change in the future. * this library may be loaded twice into a single process (potentially an old version and a newer version). The symbols will be isolated using linker namespaces, but this may break assumptions about 1 library in 1 process (your singletons will run twice). Background: This means that these modules may be built and installed twice -- once for the system partition and once for the vendor partition. The system version will build just like today, and will be used by the framework components on /system. The vendor version will build against a reduced set of exports and libraries -- similar to, but separate from, the NDK. This means that all your dependencies must also mark vendor_available. At runtime, /system binaries will load libraries from /system/lib*, while /vendor binaries will load libraries from /vendor/lib*. There are some exceptions in both directions -- bionic(libc,etc) and liblog are always loaded from /system. And SP-HALs (OpenGL, etc) may load /vendor code into /system processes, but the dependencies of those libraries will load from /vendor until it reaches a library that's always on /system. In the SP-HAL case, if both framework and vendor libraries depend on a library of the same name, both versions will be loaded, but they will be isolated from each other. It's possible to compile differently -- reducing your source files, exporting different include directories, etc. For details see: https://android-review.googlesource.com/368372 None of this is enabled unless the device opts into the system/vendor split with BOARD_VNDK_VERSION := current. Bug: 33241851 Test: build and flash internal marlin Test: m -j libbacktrace Test: build with BOARD_VNDK_VERSION := current (cherry picked from commit 4c0e956c7690abf0c434e742a369fb8576abf413) Merged-In: Idab4880e011416ebc40b225205c30fb5ed8661db Change-Id: Idab4880e011416ebc40b225205c30fb5ed8661db
* Moved include/backtrace to libbacktrace/includeVijay Venkatraman2017-04-111-0/+7
| | | | | | | | Export libbacktrace_headers Bug: 33241851 Test: Build sailfish Change-Id: Iba310ffc21d17ba542bed954a960ab305037061c
* Test unwinding through a signal handler.Christopher Ferris2017-03-231-1/+1
| | | | | | | | | Also make backtrace_testlib.c C++. Bug: 34468756 Test: Ran new unit test on host x86, host x86_64, angler (32 bit, 64 bit), Test: fugu. Change-Id: Ia810f596c2df56cd56e8ab17e6c19be0c48d737f
* Enable more modules on linux_bionic buildsDan Willemsen2017-03-151-0/+12
| | | | | | Bug: 31559095 Test: Enable host bionic, run soong Change-Id: Ib4ebd909322cf464b6a40040e4b60ece7d905b6f
* Remove obsolete mentions of LLVM_HOST_BUILD_MKColin Cross2016-12-171-14/+0
| | | | | | | | | | | The libbacktrace common flags don't need the flags from LLVM_HOST_BUILD_MK, they are added directly to libbacktrace_offline. The -fno-omit-frame-pointer is unnecessary, as we no longer import flags only used to build LLVM into everything that depends on LLVM. Removing -Wno-extern-c-compat doesn't cause any warnings. Test: mma -j Change-Id: Ia01380e8572c3d84268843291a54ec8c932a327f
* Convert the rest of libbacktrace to Android.bpColin Cross2016-12-151-2/+93
| | | | | | | | | | | See build/soong/README.md for more information. Reapplies I61c49fb62fdeafb66db25b8f97621239b8fd6e75 after fixing an unused parameter warning on mips builds. Test: mma -j Test: backtrace_test Change-Id: I6dc353a274cafcdb05ee866b41c3c2731612941c
* Revert "Convert the rest of libbacktrace to Android.bp"Colin Cross2016-12-151-93/+2
| | | | | | | | This reverts commit 9a3603622ff95a602a1ce018ada59cb52d2539f4. Broke the mips build with an unused parameter warning Change-Id: If36964ea189b58a9825de8904f1cf49010548b59
* Convert the rest of libbacktrace to Android.bpColin Cross2016-12-141-2/+93
| | | | | | | | See build/soong/README.md for more information. Test: mma -j Test: backtrace_test Change-Id: I61c49fb62fdeafb66db25b8f97621239b8fd6e75
* libbacktrace_offline: support .ARM.exidx.Yabin Cui2016-12-071-1/+14
| | | | | | | | | | | | | | | | 1. Read .ARM.exidx and .ARM.extab, provides these data to libunwind through AccessMem. 2. In FindProcInfo, search .ARM.exidx for the idx entry of function containing ip. 3. Add structures to store .ARM.exidx info in DebugFrameInfo, and clean up the structure. 4. Add tests to test each unwind information (.eh_frame, .debug_frame, .gnu_debugdata, .ARM.exidx) separately. Bug: http://b/30974693 Test: run backtrace_test. Test: run simpleperf runtest.py. Change-Id: I9377a54379158bd35860efcf0e011423be7350d4
* Add missing host ldlibsColin Cross2016-10-201-0/+1
| | | | | | | | | Host builds were compiling without -Wl,--no-undefined. Add missing host ldlibs so that -Wl,--no-undefined can be added again. Test: m -j host Bug: 32305815 Change-Id: I0ceabc3f4ec74e2f737afaac58810c5d53d6ccb6
* Rely on the platform -std default.Elliott Hughes2016-10-101-2/+0
| | | | | | Bug: http://b/32019064 Test: builds Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
* Convert libbacktrace, libutils to SoongDan Willemsen2016-07-121-0/+121
Change-Id: I8b578f671f92246aca61f98937d75a60b56bc5c6