diff -r 6a0c42c40cd1 -r dfb375d231fb src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m --- a/src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m Mon Oct 16 22:36:06 2017 -0400 +++ b/src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m Mon Oct 16 23:23:27 2017 -0700 @@ -689,8 +689,15 @@ // attach to a process/thread specified by "pid" static bool ptrace_attach(pid_t pid) { int res; - if ((res = ptrace(PT_ATTACHEXC, pid, 0, 0)) < 0) { - print_error("ptrace(PT_ATTACHEXC, %d) failed with %d\n", pid, res); +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + if ((res = ptrace(PT_ATTACH, pid, 0, 0)) < 0) { + print_error("ptrace(PT_ATTACH, %d) failed with %d\n", pid, res); +#ifdef __clang__ +#pragma clang diagnostic pop +#endif return false; } else { return ptrace_waitpid(pid);