diff options
author | Josh Gao <jmgao@google.com> | 2017-01-22 16:42:32 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-01-23 11:34:49 -0800 |
commit | 122479f4a0774a2a5599e6052ad427cbbeb8094a (patch) | |
tree | 8b243bfb7519cbbad91c1673486b79ad1bd9f2a1 /debuggerd/handler/debuggerd_handler.cpp | |
parent | 575941115e46a60d4e41dfa5336572c603917a29 (diff) |
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
Diffstat (limited to 'debuggerd/handler/debuggerd_handler.cpp')
0 files changed, 0 insertions, 0 deletions