From e86d0e14970166fa38f16187260679431cdd4119 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Tue, 9 Aug 2016 15:29:58 -0700 Subject: debuggerd: fix missed use of ptrace(PTRACE_ATTACH). Bug: http://b/29555636 Change-Id: Ibd8a2e2b619b74aac667555b7085d6f28e367c07 --- debuggerd/tombstone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp index aeffc660a..d04b72113 100644 --- a/debuggerd/tombstone.cpp +++ b/debuggerd/tombstone.cpp @@ -447,7 +447,7 @@ static bool dump_sibling_thread_report( } // Skip this thread if cannot ptrace it - if (ptrace(PTRACE_ATTACH, new_tid, 0, 0) < 0) { + if (!ptrace_attach_thread(pid, new_tid)) { _LOG(log, logtype::ERROR, "ptrace attach to %d failed: %s\n", new_tid, strerror(errno)); continue; } -- cgit v1.2.3