summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-08-09 15:29:58 -0700
committergitbuildkicker <android-build@google.com>2016-08-16 15:52:46 -0700
commite86d0e14970166fa38f16187260679431cdd4119 (patch)
treef09f96deed01b3cb70ce4afd83d1fbe9bed76167
parentd2d95688f81fcce492b46b8e260bdf4f6e0b679b (diff)
downloadsystem_core-e86d0e14970166fa38f16187260679431cdd4119.zip
system_core-e86d0e14970166fa38f16187260679431cdd4119.tar.gz
system_core-e86d0e14970166fa38f16187260679431cdd4119.tar.bz2
debuggerd: fix missed use of ptrace(PTRACE_ATTACH).
Bug: http://b/29555636 Change-Id: Ibd8a2e2b619b74aac667555b7085d6f28e367c07
-rw-r--r--debuggerd/tombstone.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index aeffc66..d04b721 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;
}