summaryrefslogtreecommitdiffstats
path: root/libbacktrace
Commit message (Collapse)AuthorAgeFilesLines
* Backtrace: Add libziparchive dependencyAndreas Gampe2017-07-041-0/+1
| | | | | | Bug: 37342627 Test: m Change-Id: I2b4155bd11b315ff49eb9a69549e1ab3678d0b28
* Use demangle for function names.Christopher Ferris2017-06-022-2/+4
| | | | | | | 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-044-11/+53
| | | | | | | | 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-114-0/+342
| | | | | | | | Export libbacktrace_headers Bug: 33241851 Test: Build sailfish Change-Id: Iba310ffc21d17ba542bed954a960ab305037061c
* Merge "Test unwinding through a signal handler."Christopher Ferris2017-03-244-21/+208
|\
| * Test unwinding through a signal handler.Christopher Ferris2017-03-234-21/+208
| | | | | | | | | | | | | | | | | | 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
* | Fix spelling error in warningBrian Carlstrom2017-03-231-1/+1
|/ | | | | | Test: m -j32 -k Bug: 36450628 Change-Id: I0f6463f3de3dcf45f396c7f406f8c1d6b79bf7f9
* Do not access device maps.Christopher Ferris2017-03-224-3/+204
| | | | | | | | | | | | | It's possible that a device map has memory controlled by a single entry device driver. Thus, you can deadlock if a process is touching that device memory and we try to unwind it and also touch that device memory. Simply skip any attempts to step through, or get function names from device memory maps. Bug: 36130325 Test: Ran new unit tests, ran bionic unit tests, ran art ThreadStress. Change-Id: Ibc62d7ec8106c619ee08968f05e04aea55d7cbfa
* Allow calling GetFunctionName before unwinding.Christopher Ferris2017-03-219-112/+160
| | | | | | | | | | | | | | | Some extra initialization needs to occur before calling the local/remote GetFunctioneName. Also, cleanup the test code a bit: - Make all local functions static. - Create a common function to create and finish remote processes. - Remove unused function. - Fix the formatting a bit by making it match clang format. Test: Ran the unit tests. Change-Id: I998bed1378d582df59fdf9263df6f208db5d795a
* Enable more modules on linux_bionic buildsDan Willemsen2017-03-151-0/+12
| | | | | | Bug: 31559095 Test: Enable host bionic, run soong Change-Id: Ib4ebd909322cf464b6a40040e4b60ece7d905b6f
* Merge "Restore errno in signal handlers."Christopher Ferris2017-03-131-0/+20
|\
| * Restore errno in signal handlers.Christopher Ferris2017-03-101-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a problem where errno could be set in a signal handler and cause bugs if other system calls were interrupted. There isn't strong evidence this is causing any issues, but add this proactively. Bug: 31448909 Test: Ran the backtrace unit tests, backtraces few random processes, Test: forced the ANR path for some zygote based processes. Test: Ran the art ThreadStress test a few times. Change-Id: I5abc9e330a5e86cea7015e2362f66044c6bc37d0
* | Add a 2 width option of clang format.Christopher Ferris2017-03-101-0/+1
|/ | | | | | | | | | | | | | | | Make the default the 4 tab space version. Add a link to the 2 space version for libbacktrace. The only other difference between the 4 space and 2 space tab version is that the 2 space tab version allows short functions on a single line. This is for things like constructors, short destructors, or accessor functions. I believe this is closer to the Google C++ style guide. Bug: 36046320 Test: NA Change-Id: Ida08db18902eeb101f42869dd5590182529d54ef
* libbacktraceoffline: make it thread-safe.Yabin Cui2017-02-131-7/+18
| | | | | | | | | | Make libbacktraceoffline thread-safe by protecting the global variable with a lock. So it can be used in a multi-thread environment, like by simpleperf inplace sampling. Bug: http://b/30974760 Test: no Change-Id: I4699bf15dfa69ac75faeb4e79a73fb3af0f08dfc
* libbacktraceoffline: choose correct debug section for a given address.Yabin Cui2017-02-104-79/+156
| | | | | | | | | | | | | | 1. In /system/lib/libart.so, the ranges of functions covered by .eh_frame and .ARM.exidx overlap with each other. Currently, we don't check .eh_frame if the address is in the ranges of functions covered by .ARM.exidx. It leads to a wrong unwinding result. So change the logic to first try .eh_frame and .debug_frame, if it fails, then try .ARM.exidx. 2. Add test for Item 1. Bug: http://b/35251937 Test: run backtrace_test. Change-Id: Ic412705617c300bc69b4ece178cc2e1bb3eb765b
* liblog: use log/log.h when utilizing ALOG macrosMark Salyzyn2017-01-112-2/+3
| | | | | | Test: compile Bug: 30465923 Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
* 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-153-218/+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
* Fix unused parameter warning for mips buildsColin Cross2016-12-151-0/+5
| | | | | | | | | | libbacktrace_offline was inheriting -Wno-unused-parameter from llvm's makefiles. Fix an unused parameter warning when compiling for an unsupported architecture, and return false since *value wasn't written. Test: lunch aosp_mips-eng && mma -j Change-Id: I7df990f01e1025ca17ec3717107df56d2349f3cb
* Revert "Convert the rest of libbacktrace to Android.bp"Colin Cross2016-12-153-93/+218
| | | | | | | | 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-143-218/+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-0717-226/+876
| | | | | | | | | | | | | | | | 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
* Statically link LLVM libraries into backtrace_testPirama Arumuga Nainar2016-11-301-35/+10
| | | | | | | | | | | | | | | Bug: http://b/28866258 Remove dependency of backtrace_test on libLLVM. Also clean up specification for libbacktrace_offline module. Since it is a static library now, dependencies are only needed to automatically include necessary headers. Test: 32-bit and 64-bit backtrace_test passes on host and on Angler. mma in system/extras/simpleperf, cts/tests/tests/simpleperf m test-art-host Change-Id: I76b0db14d067fa7b140a99edd237370ac04fe873
* Merge "Revert "Use process_vm_readv to read memory.""Christopher Ferris2016-11-141-12/+33
|\
| * Revert "Use process_vm_readv to read memory."Christopher Ferris2016-11-101-12/+33
| | | | | | | | | | | | | | | | | | This reverts commit 279843e1397aff2aedb5e5ffe513893fa1f6767f. Bug: 32806783 Change-Id: I61df26d979a8139a571ff5a6442fb5499ca20547 Test: Verified that the stack and read data works with the revert.
* | Make libbacktrace build with LLVM r275480Pirama Arumuga Nainar2016-10-251-1/+1
| | | | | | | | | | | | | | | | | | Bug: http://b/31320715 Test: No regression in 32-bit and 64-bit backtrace_test on host and angler. Change-Id: Ic5c5511e89ca7707ed9c13d5ba0539e09310dfe3
* | Merge "Add missing host ldlibs"Colin Cross2016-10-201-0/+1
|\ \
| * | 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
* | | system/core: preparation to pull back interfaces from android/log.hMark Salyzyn2016-10-201-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Point to log/log.h where necessary, define LOG_TAG where necessary. Accept that private/android_logger.h is suitable replacement for log/logger.h and android/log.h. Correct liblog/README Effectively a cleanup and controlled select revert of 'system/core: drop or replace log/logger.h' and 'system/core: Replace log/log.h with android/log.h'. Test: compile Bug: 30465923 Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
* | Merge "Rely on the platform -std default."Treehugger Robot2016-10-142-8/+0
|\ \ | |/ |/|
| * Rely on the platform -std default.Elliott Hughes2016-10-102-8/+0
| | | | | | | | | | | | Bug: http://b/32019064 Test: builds Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
* | Use process_vm_readv to read memory.Christopher Ferris2016-10-121-33/+12
|/ | | | | | | | | Modify BacktracePtrace::Read to use the process_vm_readv syscall instead of doing multiple ptrace calls. Test: Ran the backtrace unit tests on host and on x86_64 emulator. Change-Id: I24c2787f6713d8eb44312f3aa751d1f6d9d34719
* system/core Replace log/log.h with android/log.hMark Salyzyn2016-09-302-2/+2
| | | | | | | | | | | Should use android/log.h instead of log/log.h as a good example to all others. Adjust header order to comply with Android Coding standards. Test: Compile Bug: 26552300 Bug: 31289077 Change-Id: I33a8fb4e754d2dc4754d335660c450e0a67190fc
* Replace libziparchive-host with libziparchiveColin Cross2016-08-261-2/+2
| | | | | | | libziparchive-host is no longer necessary, and mixing libziparchive-host and libziparchive can cause ODR violations. Change-Id: I27b2cc9974000ee7bf1d1ac15fd7b069862d9b01
* Merge \"Fix clang-tidy performance warnings in syste/core.\"Chih-Hung Hsieh2016-08-011-1/+1
|\ | | | | | | | | | | am: 4efbce14b5 Change-Id: I84f6b0134fae6e9f40710f243f4825e3f31fa15f
| * Merge "Fix clang-tidy performance warnings in syste/core."Treehugger Robot2016-08-011-1/+1
| |\
| | * Fix clang-tidy performance warnings in syste/core.Chih-Hung Hsieh2016-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use const reference type for parameters to avoid unnecessary copy. * Suppress warning of not using faster overloaded string find function. Bug: 30407689 Bug: 30411878 Change-Id: I6cfdbbd50cf5e8f3db6e5263076d3a17a9a791ee Test: build with WITH_TIDY=1 Merged-In: Ie79dbe21899867bc62031f8618bb1322b8071525
* | | Merge \"Fix google-explicit-constructor warnings in system/core.\"Chih-Hung Hsieh2016-07-291-2/+2
|\| | | | | | | | | | | | | | | | | am: 6dc68cb5f9 Change-Id: I5a010465364b6e14423b19e8c0f9cffa58ee3152
| * | Fix google-explicit-constructor warnings in system/core.Chih-Hung Hsieh2016-07-261-2/+2
| |/ | | | | | | | | | | | | | | | | | | * Declare explicit conversion constructors. * Add NOLINT for implicit conversion constructors. * Fix also some misaligned indendations. Bug: 28341362 Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e Test: build with clang-tidy
* | resolve merge conflicts of 41e82a3 to stage-aosp-masterColin Cross2016-07-122-86/+121
|\| | | | | | | Change-Id: I5a7faca3249f0c038914540b1dd29edf0084c0e1
| * Convert libbacktrace, libutils to SoongDan Willemsen2016-07-122-86/+121
| | | | | | | | Change-Id: I8b578f671f92246aca61f98937d75a60b56bc5c6
* | Merge \"Fix race condition updating local map data.\"Christopher Ferris2016-06-184-5/+24
|\| | | | | | | | | | | am: 863d8e11b9 Change-Id: I00899ce500c2ae8bc58b6eb42c01d8688dd232c0
| * Fix race condition updating local map data.Christopher Ferris2016-06-164-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | If the underlying local map changes, it's possible for multiple threads to try and modify the map data associated with the UnwindLocalMap object. Add a lock when generating the local map to avoid this problem. In addition, add a read lock whenever any caller gets the maps iterator. Updated all iterator callers to make this lock. Bug: 29387050 Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
* | Merge "Remove invalid uses of -l and -I" am: 5d6193c658Dan Willemsen2016-06-011-1/+3
|\| | | | | | | | | | | | | | | | | am: 9ae3c079dc * commit '9ae3c079dca647869dcbc5a5075609f0895e4f4c': Remove invalid uses of -l and -I Change-Id: Id0ddd34cee10579684cdde36f3c095658a50784b
| * Remove invalid uses of -l and -IDan Willemsen2016-06-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | LOCAL_LDLIBS should only be used with -l flags for NDK and some host libraries. Other uses should use LOCAL_SHARED_LIBRARIES. LOCAL_LDFLAGS should not contain -l entries, they should be in LOCAL_LDLIBS instead. LOCAL_CFLAGS should not contain -I entries, those should use LOCAL_C_INCLUDES instead. Change-Id: Ic901aa14651572ac682166becd4f0cd86baecc34
* | Merge "Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace." ↵Chih-Hung Hsieh2016-05-192-2/+2
|\| | | | | | | | | | | | | | | | | | | | | am: dab7d9de03 am: fa7569c921 * commit 'fa7569c921b9ca0db894287ea826cbd3b041d880': Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace. Change-Id: I63223e36f3627d312051c86d54919b6cef33766c
| * Fix misc-macro-parentheses warnings in adb, debuggerd, libbacktrace.Chih-Hung Hsieh2016-05-182-2/+2
| | | | | | | | | | Bug: 28705665 Change-Id: I469b2a882f6d1f399bfc22c75a26da245991fc33
* | Merge "Fix google-explicit-constructor warnings." am: 7bdd6a8b5aChih-hung Hsieh2016-04-301-1/+1
|\| | | | | | | | | | | | | | | | | am: 427d8d840f * commit '427d8d840f6ec5ce5767b2ee521e4ac5b7ebd619': Fix google-explicit-constructor warnings. Change-Id: I26dc45aca83f991aa7993f6d4233e0439dd44a22