# HG changeset patch # User sla # Date 1367351222 -7200 # Node ID e4614b063fe1a5ac70518d7f28d15ea66250d524 # Parent ed5a590835a4c18512e89922e69523f845040693 8013364: SA-JDI exceptions caused by lack of permissions on OSX should be more verbose about issue cause Reviewed-by: coleenp, rbackman diff -r ed5a590835a4 -r e4614b063fe1 agent/src/os/bsd/MacosxDebuggerLocal.m --- a/agent/src/os/bsd/MacosxDebuggerLocal.m Tue Apr 30 09:17:06 2013 -0400 +++ b/agent/src/os/bsd/MacosxDebuggerLocal.m Tue Apr 30 21:47:02 2013 +0200 @@ -707,8 +707,8 @@ task_t gTask = 0; result = task_for_pid(mach_task_self(), jpid, &gTask); if (result != KERN_SUCCESS) { - print_error("attach: task_for_pid(%d) failed (%d)\n", (int)jpid, result); - THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process"); + print_error("attach: task_for_pid(%d) failed: '%s' (%d)\n", (int)jpid, mach_error_string(result), result); + THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process. Could be caused by an incorrect pid or lack of privileges."); } putTask(env, this_obj, gTask);