From b53f903cf1172b62cbaff17c34405b27172acb76 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Mon, 30 Jan 2017 17:04:56 -0800 Subject: [PATCH 1/2] debuggerd: fix `debuggerd -b ` Dump all of the threads when using `debuggerd -b`. Bug: http://b/34719257 Test: `debuggerd -b mediaserver` Change-Id: I2f57100985e5b0c2bf019482ba9feff31921692f --- debuggerd/crash_dump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index c14593393..58eaed717 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -322,7 +322,7 @@ int main(int argc, char** argv) { bool fatal_signal = signo != DEBUGGER_SIGNAL; std::set siblings; std::set attached_siblings; - if (fatal_signal) { + if (fatal_signal || backtrace) { if (!android::procinfo::GetProcessTids(target, &siblings)) { PLOG(FATAL) << "failed to get process siblings"; } From 1e4afb52c58c3d960160bfe1f7442618aeeec1ce Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Mon, 30 Jan 2017 17:05:40 -0800 Subject: [PATCH 2/2] debuggerd: fix `debuggerd ` Bug: none Test: `debuggerd mediaserver` Change-Id: Ibd7bbddb92a99ce49622c0ecc9329a3723f2085d --- debuggerd/debuggerd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp index 320823082..0c5d3cf9b 100644 --- a/debuggerd/debuggerd.cpp +++ b/debuggerd/debuggerd.cpp @@ -71,7 +71,7 @@ int main(int argc, char* argv[]) { std::thread redirect_thread = spawn_redirect_thread(std::move(piperead)); bool backtrace = argc == 3; if (!debuggerd_trigger_dump(pid, std::move(pipewrite), - backtrace ? kDebuggerdBacktrace : kDebuggerdBacktrace, 0)) { + backtrace ? kDebuggerdBacktrace : kDebuggerdTombstone, 0)) { redirect_thread.join(); errx(1, "failed to dump process %d", pid); }