96722b0fa48524e03659c0a3d579f8ef4f1641ba |
|
19-Jul-2017 |
Christopher Ferris <cferris@google.com> |
Cleanup the libbacktrace interface a bit. - Change the field name load_base to load_bias (which is what it really is). - Add a rel_pc field so that callers do not need to compute it themselves. - Remove the BacktraceMap::GetRelativePc() since nobody should need to compute this themselves. Bug: 23762183 Test: Compiles and unit tests pass (debuggerd, libbacktrace). Change-Id: I2cb579767120adf08c407a58f3c487ee3f2b45fc
/system/core/libbacktrace/Backtrace.cpp
|
7d0aea91c9b8939ddc5c8602d427da1052441309 |
|
01-Jun-2017 |
Christopher Ferris <cferris@google.com> |
Use demangle for function names. Bug: 62141808 Test: Ran unit tests, ran debuggerd -b on android processes. Change-Id: I40f341bcb2b35dd0a020d245d6b6f2ed2df65481
/system/core/libbacktrace/Backtrace.cpp
|
6d1da7c607647bb783af9c50097557c864606bc4 |
|
23-Mar-2017 |
Brian Carlstrom <bdc@google.com> |
Fix spelling error in warning Test: m -j32 -k Bug: 36450628 Change-Id: I0f6463f3de3dcf45f396c7f406f8c1d6b79bf7f9
/system/core/libbacktrace/Backtrace.cpp
|
f5e568e653d0dd6bccc86d1a60db5a2573f75f0e |
|
22-Mar-2017 |
Christopher Ferris <cferris@google.com> |
Do not access device maps. 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
/system/core/libbacktrace/Backtrace.cpp
|
05e1e1fb4100bb52fab2af41dc6caaf31c527819 |
|
23-Mar-2016 |
Josh Gao <jmgao@google.com> |
Don\'t demangle symbol names. am: fbbc744 am: 0edda64 am: 9bf0b81 am: 0fb3191 * commit '0fb3191840680f7e084aa9ee53a1906074a16b68': Don't demangle symbol names.
|
fbbc744130c85538a754d245e958d7d79f24309c |
|
23-Mar-2016 |
Josh Gao <jmgao@google.com> |
Don't demangle symbol names. Bug: http://b/27299236 Change-Id: I26ef47f80d4d6048a316ba51e83365ff65d70439
/system/core/libbacktrace/Backtrace.cpp
|
c463ba45c42b4e2d8ce30c02a626d7183102f46e |
|
09-Mar-2016 |
Christopher Ferris <cferris@google.com> |
Add error reporting mechanism for failing Unwind. Remove the logging of an error if a thread disappears before the unwind can begin. This can happen, so allow the caller to determine if this is really a problem worth logging. Bug: 27449879 (cherry picked from commit 206a3b9798e3622c906a3cafdb113c271c1c927c) Change-Id: If9e7cfeb6eb7b122679a734c1a9eacee8354ef18
/system/core/libbacktrace/Backtrace.cpp
|
85402160287d2c219fd5fb78bd26545a2937ef98 |
|
26-Jan-2016 |
Christopher Ferris <cferris@google.com> |
Put BacktraceOffline code into a separate library. BacktraceOffline is the only code that uses libLLVM. Create a new shared library, backtrace_offline.so, that references this so that including libbacktrace.so doesn't wind up pulling in libLLVM. Change-Id: I90c502d833f6c464c3810dffde52a0c6da241cce
/system/core/libbacktrace/Backtrace.cpp
|
6405bb3aee4f0f927d6f9dd54a585a33d5f2bb1f |
|
08-Dec-2015 |
Yabin Cui <yabinc@google.com> |
Fix libbacktrace host build. On host build, libbacktrace relies on libcutils to provide gettid() function. Change-Id: Iad83384ea699ca024b71b73cef26755287c9e6fe
/system/core/libbacktrace/Backtrace.cpp
|
4f71319df011d796a60a43fc1bc68e16fbf7d321 |
|
05-Dec-2015 |
Elliott Hughes <enh@google.com> |
Track rename of base/ to android-base/. Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
/system/core/libbacktrace/Backtrace.cpp
|
da750a79c9fe503d52feb7af2c417b19f763649c |
|
30-Nov-2015 |
Christopher Ferris <cferris@google.com> |
Change the way some maps are printed. Before, an anonymous map wound up printing the pc as relative. Unfortunately, this meant that it was impossible to tell the actual pc. The new code prints the map name as <anonymous:map_start> and still prints the pc as relative. In addition, add the start of the map for map names that begin with a '[' character. Bug: 25844836 Change-Id: Ie0b6149dde258fe13f0e5a3e5739d85374512f4b
/system/core/libbacktrace/Backtrace.cpp
|
9e402bb20cb868577e5588d8323363411655291b |
|
22-Sep-2015 |
Yabin Cui <yabinc@google.com> |
Revert "Revert "Revert "Revert "Add BacktraceOffline for offline backtracing."""" This reverts commit 94ece83270deca76c69f5755f8c0ff5c859341fd. Change-Id: Ie06465c89a5fc115517130f9f2904cc855973155
/system/core/libbacktrace/Backtrace.cpp
|
94ece83270deca76c69f5755f8c0ff5c859341fd |
|
22-Sep-2015 |
Yabin Cui <yabinc@google.com> |
Revert "Revert "Revert "Add BacktraceOffline for offline backtracing.""" This reverts commit 0a411c934a81e5c77a27ef5b69d391038f36e969. Change-Id: Ic1824afac6c32f1087b66de9d6368a561f235d13
/system/core/libbacktrace/Backtrace.cpp
|
0a411c934a81e5c77a27ef5b69d391038f36e969 |
|
19-Sep-2015 |
Yabin Cui <yabinc@google.com> |
Revert "Revert "Add BacktraceOffline for offline backtracing."" 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
/system/core/libbacktrace/Backtrace.cpp
|
ab5e583327e4dfd9f7c38ab6ed4c4714508ce544 |
|
18-Sep-2015 |
Yabin Cui <yabinc@google.com> |
Revert "Add BacktraceOffline for offline backtracing." Using llvm makes libbacktrace stops building for 32 bit on linux host x86_64. This reverts commit c9c6b6ee7735f014771d81615c0278b53d14f61c. Change-Id: Ieb807db881d7bb3132cd09e25fd08c28766ca0a8
/system/core/libbacktrace/Backtrace.cpp
|
c9c6b6ee7735f014771d81615c0278b53d14f61c |
|
14-Aug-2015 |
Yabin Cui <yabinc@google.com> |
Add BacktraceOffline for offline backtracing. It is used by simpeleprf for stack unwinding. Bug: 22229391 Change-Id: I26d698610ccdc9545da837bc5a8a9ec787f27a6b
/system/core/libbacktrace/Backtrace.cpp
|
600017332cb3969c8a23012362f4b63d73e1f9ea |
|
20-Aug-2015 |
Christopher Ferris <cferris@google.com> |
Display the map offset for each frame. The dlopen of a shared library in an apk results in large map offsets. Unfortunately, the current way that the frame data is printed, it's impossible to tell what the relative pc is relative to. With the addition of the offset, it's possible to figure out what the relative pc actually references. Bug: 23348999 (cherry picked from commit e0ab23223a1c3110c9550136b8a119b4c30ec066) Change-Id: I950f92c1cb29ee05eed777f47453efa03318cf3e
/system/core/libbacktrace/Backtrace.cpp
|
e0ab23223a1c3110c9550136b8a119b4c30ec066 |
|
20-Aug-2015 |
Christopher Ferris <cferris@google.com> |
Display the map offset for each frame. The dlopen of a shared library in an apk results in large map offsets. Unfortunately, the current way that the frame data is printed, it's impossible to tell what the relative pc is relative to. With the addition of the offset, it's possible to figure out what the relative pc actually references. Bug: 23348999 Change-Id: Ia51b669ea3f810158cfd0d71d9ae89bf9a3170d3
/system/core/libbacktrace/Backtrace.cpp
|
eb19e766322fb57ccde989e0e35b0ac3e28a4ac2 |
|
15-May-2015 |
Christopher Ferris <cferris@google.com> |
Prevent crashes if a map cannot be created. Under some conditions, /proc/<pid>/maps might return nothing. If we try and unwind in this case, we'll crash. Check this case and fail the unwind. Add checks that no other functions try and use map_ without checking for nullptr. Add logging when an unwind fails so it's clear what happened. Bug: 21162746 Change-Id: I56ce51dda0cfc9db20475a441f118108196aa07c (cherry picked from commit 30c942cf1024bf791c28ab9b67a1f752de72248c)
/system/core/libbacktrace/Backtrace.cpp
|
30c942cf1024bf791c28ab9b67a1f752de72248c |
|
15-May-2015 |
Christopher Ferris <cferris@google.com> |
Prevent crashes if a map cannot be created. Under some conditions, /proc/<pid>/maps might return nothing. If we try and unwind in this case, we'll crash. Check this case and fail the unwind. Add checks that no other functions try and use map_ without checking for nullptr. Add logging when an unwind fails so it's clear what happened. Bug: 21162746 Change-Id: I56ce51dda0cfc9db20475a441f118108196aa07c
/system/core/libbacktrace/Backtrace.cpp
|
428fad97a0c9c3def1489b16f0257a9cbcfd43f8 |
|
30-Apr-2015 |
Dan Albert <danalbert@google.com> |
Remove libbacktrace definition of gettid. Also simplifies the Darwin implementation of gettid, because apparently libbacktrace had a better way of doing it. Bug: 19517541 (cherry picked from commit 23f750b068ddf5b20fb5d153a798b22562368992) Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
/system/core/libbacktrace/Backtrace.cpp
|
2106f4ba95004fdfc76ad3fa308a07fdbf475984 |
|
02-May-2015 |
Christopher Ferris <cferris@google.com> |
Add load base to map for relocation packing. 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
/system/core/libbacktrace/Backtrace.cpp
|
329ed7dae49eba09bdf865dd999d1a7e73bb9687 |
|
02-May-2015 |
Christopher Ferris <cferris@google.com> |
Add load base to map for relocation packing. 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 Change-Id: Iec2d1db2051e7b4a278c1dfa57d745128a7f2974
/system/core/libbacktrace/Backtrace.cpp
|
23f750b068ddf5b20fb5d153a798b22562368992 |
|
30-Apr-2015 |
Dan Albert <danalbert@google.com> |
Remove libbacktrace definition of gettid. Also simplifies the Darwin implementation of gettid, because apparently libbacktrace had a better way of doing it. Change-Id: I9e14f9176b167405a5aaa5b8a0db0327c7126271
/system/core/libbacktrace/Backtrace.cpp
|
2c43cff01d1271be451671567955158629b23670 |
|
27-Mar-2015 |
Christopher Ferris <cferris@google.com> |
Refactor the code. 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
/system/core/libbacktrace/Backtrace.cpp
|
df2906186b6952c57b1f662bfef0b65c9f8c2e0d |
|
23-Jan-2014 |
Christopher Ferris <cferris@google.com> |
Re-enable libunwind for arm. 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
/system/core/libbacktrace/Backtrace.cpp
|
46756821c4fe238f12a6e5ea18c356398f8d8795 |
|
15-Jan-2014 |
Christopher Ferris <cferris@google.com> |
Rewrite libbacktrace to be all C++. 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
/system/core/libbacktrace/Backtrace.cpp
|
f67c6410d12a1829b0c6d009c848d72cd0158ee4 |
|
10-Jan-2014 |
Christopher Ferris <cferris@google.com> |
Create a bare bones host libbacktrace on mac. This allows the libbacktrace library to compile for host on mac. Bug: 12474939 Change-Id: I32cbcf996e6fe9057e5065ba21f89086343704a0
/system/core/libbacktrace/Backtrace.cpp
|
20303f856f1f1cdb5af58af0b116b8c598f0ea5c |
|
11-Jan-2014 |
Christopher Ferris <cferris@google.com> |
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
/system/core/libbacktrace/Backtrace.cpp
|
bc12d6329ef72147da93881a34aab763905b1039 |
|
12-Nov-2013 |
Christopher Ferris <cferris@google.com> |
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 242b1a8c7a5ec73172bac811e51acbc27201f22c) Conflicts: libbacktrace/Backtrace.cpp
/system/core/libbacktrace/Backtrace.cpp
|
9846497f7926fc3240c2893d89e60880c22d1fd6 |
|
07-Jan-2014 |
Christopher Ferris <cferris@google.com> |
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
/system/core/libbacktrace/Backtrace.cpp
|
cbfc7302fb3b5d5c77d2aa7974b26983ce479aa0 |
|
05-Nov-2013 |
Christopher Ferris <cferris@google.com> |
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
/system/core/libbacktrace/Backtrace.cpp
|
8ed46278bee3cfc4c216f3a1524744019b693200 |
|
29-Oct-2013 |
Christopher Ferris <cferris@google.com> |
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
/system/core/libbacktrace/Backtrace.cpp
|
17e91d44edf5e6476a477a200bcd89d4327358a3 |
|
21-Oct-2013 |
Christopher Ferris <cferris@google.com> |
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
/system/core/libbacktrace/Backtrace.cpp
|