android_system_core/debuggerd
Josh Gao 122479f4a0 crash_dump: switch to PTRACE_SEIZE.
ptrace(PTRACE_ATTACH) does not immediately put the traced process in a
stopped state. If we manage to call PTRACE_CONT on it before it
finishes, we'll fail. Switch to using PTRACE_SEIZE and PTRACE_INTERRUPT
to guarantee that the target stops immediately.

This also has the advantage of never putting the process in group-stop
state, which means if we exit prematurely (e.g. if we crash during
stack unwinding), the target process will be resumed without any
intervention needed.

Bug: http://b/34472671
Test: while true; do debuggerd -b `pidof audioserver`; done
Change-Id: I7549f67489646cf300b8c9aa8c735e5e897806ef
2017-01-23 11:34:49 -08:00
..
client debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
crasher debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
handler crash_dump: clear the default crash handlers. 2017-01-23 11:34:49 -08:00
include/debuggerd crash_dump: clear the default crash handlers. 2017-01-23 11:34:49 -08:00
libdebuggerd debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
tombstoned Merge "init: don't start tombstoned until /data is mounted." 2017-01-20 22:13:38 +00:00
.clang-format debuggerd: add .clang-format. 2015-11-16 17:26:22 -08:00
Android.bp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
crash_dump.cpp crash_dump: switch to PTRACE_SEIZE. 2017-01-23 11:34:49 -08:00
debuggerd.cpp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
debuggerd_test.cpp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
signal_sender.cpp liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
util.cpp debuggerd: advance our amazing bet. 2017-01-17 13:57:57 -08:00