From 1072f917cfa36ff905c31122a3cd99224e305932 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Fri, 31 Oct 2014 21:34:38 -0700 Subject: Fix debuggerd issues. - Fix a problem where a tid exits before the attach completes, and it causes debuggerd to self terminate. - Fix a problem where sibling tid dumps do not properly wait for the tid to get signalled. Bug: 17800180 Bug: 12567315 (cherry picked from commit 84ddb34a3af77dbe490aaa07b738bbfd7109d5ba) Change-Id: I45e33865614d4c96f4a89cf117398666b556d500 --- debuggerd/backtrace.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debuggerd/backtrace.cpp') diff --git a/debuggerd/backtrace.cpp b/debuggerd/backtrace.cpp index c4a2143..e7919e9 100644 --- a/debuggerd/backtrace.cpp +++ b/debuggerd/backtrace.cpp @@ -88,7 +88,9 @@ static void dump_thread( return; } - wait_for_stop(tid, total_sleep_time_usec); + if (!attached && wait_for_sigstop(tid, total_sleep_time_usec, detach_failed) == -1) { + return; + } UniquePtr backtrace(Backtrace::Create(tid, BACKTRACE_CURRENT_THREAD)); if (backtrace->Unwind(0)) { -- cgit v1.1