summaryrefslogtreecommitdiff
path: root/debuggerd/debuggerd.cpp
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2017-05-24 15:07:25 +0100
committerNarayan Kamath <narayan@google.com>2017-05-31 10:35:32 +0100
commita73df601b7fe192001f4b9b5ddeb17b8efe3981b (patch)
tree268e9df211bc6e81391f8e121e9ccde25c70b26c /debuggerd/debuggerd.cpp
parent844940d751be6cf6078c9e816fc09356034c1b26 (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/debuggerd.cpp')
-rw-r--r--debuggerd/debuggerd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp
index 4997dd64b..6298ace9d 100644
--- a/debuggerd/debuggerd.cpp
+++ b/debuggerd/debuggerd.cpp
@@ -72,8 +72,8 @@ int main(int argc, char* argv[]) {
}
std::thread redirect_thread = spawn_redirect_thread(std::move(piperead));
- if (!debuggerd_trigger_dump(pid, std::move(pipewrite),
- backtrace_only ? kDebuggerdBacktrace : kDebuggerdTombstone, 0)) {
+ if (!debuggerd_trigger_dump(pid, backtrace_only ? kDebuggerdNativeBacktrace : kDebuggerdTombstone,
+ 0, std::move(pipewrite))) {
redirect_thread.join();
errx(1, "failed to dump process %d", pid);
}