diff options
Diffstat (limited to 'linker/debugger.cpp')
-rw-r--r-- | linker/debugger.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linker/debugger.cpp b/linker/debugger.cpp index 9ebb09ba6..079682cab 100644 --- a/linker/debugger.cpp +++ b/linker/debugger.cpp @@ -206,6 +206,15 @@ static bool have_siginfo(int signum) { } static void send_debuggerd_packet(siginfo_t* info) { + if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0) { + // process has disabled core dumps and PTRACE_ATTACH, and does not want to be dumped. + // Honor that intention by not connecting to debuggerd and asking it + // to dump our internal state. + __libc_format_log(ANDROID_LOG_INFO, "libc", + "Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0"); + return; + } + int s = socket_abstract_client(DEBUGGER_SOCKET_NAME, SOCK_STREAM); if (s == -1) { __libc_format_log(ANDROID_LOG_FATAL, "libc", "Unable to open connection to debuggerd: %s", |