src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m
changeset 47635 dfb375d231fb
parent 47216 71c04702a3d5
child 50818 e46b9e514479
--- 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);