diff options
author | Narayan Kamath <narayan@google.com> | 2017-05-24 15:07:25 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2017-05-31 10:35:32 +0100 |
commit | a73df601b7fe192001f4b9b5ddeb17b8efe3981b (patch) | |
tree | 268e9df211bc6e81391f8e121e9ccde25c70b26c /debuggerd/handler/debuggerd_fallback.cpp | |
parent | 844940d751be6cf6078c9e816fc09356034c1b26 (diff) |
tombstoned: allow intercepts for java traces.
All intercept requests and crash dump requests must now specify a
dump_type, which can be one of kDebuggerdNativeBacktrace,
kDebuggerdTombstone or kDebuggerdJavaBacktrace. Each process can have
only one outstanding intercept registered at a time.
There's only one non-trivial change in this changeset; and that is
to crash_dump. We now pass the type of dump via a command line
argument instead of inferring it from the (resent) signal, this allows
us to connect to tombstoned before we wait for the signal as the
protocol requires.
Test: debuggerd_test
Change-Id: I189b215acfecd08ac52ab29117e3465da00e3a37
Diffstat (limited to 'debuggerd/handler/debuggerd_fallback.cpp')
-rw-r--r-- | debuggerd/handler/debuggerd_fallback.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/debuggerd/handler/debuggerd_fallback.cpp b/debuggerd/handler/debuggerd_fallback.cpp index a9c9862e4..43104ecbd 100644 --- a/debuggerd/handler/debuggerd_fallback.cpp +++ b/debuggerd/handler/debuggerd_fallback.cpp @@ -151,7 +151,7 @@ static void trace_handler(siginfo_t* info, ucontext_t* ucontext) { // Fetch output fd from tombstoned. unique_fd tombstone_socket, output_fd; - if (!tombstoned_connect(getpid(), &tombstone_socket, &output_fd)) { + if (!tombstoned_connect(getpid(), &tombstone_socket, &output_fd, kDebuggerdNativeBacktrace)) { goto exit; } @@ -215,7 +215,8 @@ static void crash_handler(siginfo_t* info, ucontext_t* ucontext, void* abort_mes } unique_fd tombstone_socket, output_fd; - bool tombstoned_connected = tombstoned_connect(getpid(), &tombstone_socket, &output_fd); + bool tombstoned_connected = + tombstoned_connect(getpid(), &tombstone_socket, &output_fd, kDebuggerdTombstone); debuggerd_fallback_tombstone(output_fd.get(), ucontext, info, abort_message); if (tombstoned_connected) { tombstoned_notify_completion(tombstone_socket.get()); |