summaryrefslogtreecommitdiffstats
path: root/debuggerd/crasher.c
Commit message (Collapse)AuthorAgeFilesLines
* Make crasher smash-stack work.Yabin Cui2014-12-111-10/+18
| | | | | Bug: 18721888 Change-Id: Id0280df7cb2c29832256d3d395e6399fcef9aa2b
* Add volatile to avoid clang optimization.Chih-Hung Hsieh2014-10-231-1/+1
| | | | | BUG: 18108178 Change-Id: Ie5b8b1808fcf6d1eacc14a7c6ac0c8d49641fec2
* Add SIGFPE to crasher.Elliott Hughes2014-07-151-1/+5
| | | | | Bug: 3399996 Change-Id: I115caf846a47f57984c1b1844104e37d29e6f24e
* Improving maps output.Brigid Smith2014-07-081-0/+6
| | | | | | | | | | | | | | | Maps output now displays fault address location more intelligently. If the fault is not in a mapped region, it now shows where that address is with respect to the other maps. In addition, the size of the map is now printed as part of the output. Also, crasher now supports an "mmap" option which mmaps/munmaps a region of memory and then attempts to access it, causing a fault address in between mapped regions that can be used to test that new part of the maps output. Change-Id: Ia5e1926802bdfcbbdb7857e3631ddf395ae0c5b8
* Changed maps output in debuggerd.Brigid Smith2014-06-171-1/+9
| | | | | | | | | | | Now the map output is only sent to the tombstone, and the entire contents of /prod/$PID/maps is logged, not just 3 lines. Additionally, crasher now supports "crasher SIGSEGV-non-null", which attempts to write to a dereferenced function address, causing a SIGSEGV at a non-zero address. This new crasher mode can be used to test the new maps output. Bug: 15343662 Change-Id: I796d92e8352a6b9714bbbfe96f3143c56565ef2f
* Add SIGTRAP support to crasher and debuggerd.Elliott Hughes2014-05-161-0/+4
| | | | | Bug: 15024256 Change-Id: I3f34993fcfd9799306852b0a2195db468370be6e
* debuggerd: turn on -WerrorMark Salyzyn2014-05-021-7/+7
| | | | | | - Deal with some -Wunused / -Wunused-variable issues Change-Id: I39849fe30170f69d1cab7d4ad2629b3a49e14ee7
* Use the si_code value bionic passes us.Elliott Hughes2014-04-251-12/+21
| | | | | | | | | Bionic needs to re-raise various signals, which means the si_code debuggerd sees has been clobbered. If bionic sends us the original si_code value, we can use that instead of the one we see when the ptrace the crashed process' siginfo. Change-Id: If116a6bc667d55a6fb39b74f96673292af4e4c8c
* Improve liblog's fatal logging.Elliott Hughes2014-04-241-21/+28
| | | | | | | This makes LOG_ALWAYS_FATAL and LOG_ALWAYS_FATAL_IF as good as regular assert(3). Change-Id: I0666684d30cae7baf23c64b33d35c1e43f81acf0
* system/core LP64 cleanup.Elliott Hughes2014-02-051-4/+4
| | | | | | | Fixes -Wint-to-pointer and -Wpointer-to-int warnings, plus various -Wformat warnings. Change-Id: I6c5eea6b4273d82d28b8e5d2925f3e5457511b17
* Remove dead code that looked like part of debuggerd.Elliott Hughes2014-01-311-13/+0
| | | | | | | Note that these were two different functions. The definition was unused, and the declaration was undefined. Change-Id: I2edd10a0ab9422cd5252bdb9ccdd726dc5fad531
* Improve the crasher stack-overflow command.Elliott Hughes2013-07-151-2/+4
| | | | | | Runs a lot quicker, with no intermediate noise. Change-Id: Icd911ff305da2e0889029dc78d5c2b39f32111c5
* Add a new test to crasher to upset dlmalloc.Elliott Hughes2013-06-121-25/+34
| | | | | | | | We should also add a test for heap corruption, but I failed to come up with a kind of corruption that dlmalloc actually detects (rather than just crashing accidentally). Change-Id: I7457e732729635b171ffc44517c3de71f55608e6
* Add a stack overflow test to crasher, and document all the options.Elliott Hughes2013-04-231-27/+38
| | | | Change-Id: Iebe80c24ef43f08d258881e7847516d414436931
* Unwinding implementation via eh_frame sections for x86Pavel Chupin2013-03-141-0/+16
| | | | | | | | | | | | | | | Backtracing through eh_frame section is more effective allowing to reuse ebp register for other purposes within routine. GCC with turned on optimizations (-O1 and above) implicitly defines -fomit-frame-pointer anyway. eh_frame sections are generated by default with GCC on any optimization level. This change implements remote unwinding (separate process unwinding). Local unwinding is already implemented through _Unwind_Backtrace call which is implemented in libgcc. Change-Id: I1aea1ecd19c21710f9cf5f05dc272fc51b67b7aa Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* Add a "smash-stack" option to crasher.Elliott Hughes2013-02-141-0/+13
| | | | | | | | bionic's __stack_chk_fail was preventing debuggerd from dumping stacks, which was not helpful. Bug: 2487269 Change-Id: Idba2a274037b960dfb2ac1c21686323268c4b372
* Expand crasher with a "thread-" prefix to crash on another thread.Elliott Hughes2012-12-101-11/+34
| | | | | | | | So "thread-nostack" runs the "nostack" code on a new thread, and "thread-abort" runs the "abort" code on a new thread, and so on. Bug: http://code.google.com/p/android/issues/detail?id=16672 Change-Id: I026a0e43eea147f1a7a74243846954599bcf4238
* debuggerd: Reorganize to facilitate IA commitBruce Beare2010-11-291-0/+1
| | | | | Change-Id: I22dd02daf617672fc0a8ba7e396017c57f17e26e Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+105
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-105/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+105