ShowMessageBoxOnError on mac is just a copy of the Linux version.
Should call 'lldb -p %p' instead. Mac is able to recognize executables by itself. BTW Mac policy is strict, might ask for some permissions.
diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp
index 52b7e1496cc..e895b067799 100644
--- a/src/hotspot/os/bsd/os_bsd.cpp
+++ b/src/hotspot/os/bsd/os_bsd.cpp
@@ -2600,18 +2600,17 @@ bool os::start_debugging(char *buf, int buflen) {
jio_snprintf(p, buflen-len,
"\n\n"
"Do you want to debug the problem?\n\n"
- "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
- "Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
+ "To debug, run '`lldb -p %d`'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
+ "Enter 'yes' to launch lldb automatically (PATH must include lldb)\n"
"Otherwise, press RETURN to abort...",
- os::current_process_id(), os::current_process_id(),
- os::current_thread_id(), os::current_thread_id());
+ os::current_process_id(), os::current_thread_id(), os::current_thread_id());
bool yes = os::message_box("Unexpected Error", buf);
if (yes) {
// yes, user asked VM to launch debugger
- jio_snprintf(buf, sizeof(buf), "gdb /proc/%d/exe %d",
- os::current_process_id(), os::current_process_id());
+ jio_snprintf(buf, buflen, "lldb -p %d",
+ os::current_process_id());
os::fork_and_exec(buf);
yes = false;
Should call 'lldb -p %p' instead. Mac is able to recognize executables by itself. BTW Mac policy is strict, might ask for some permissions.
diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp
index 52b7e1496cc..e895b067799 100644
--- a/src/hotspot/os/bsd/os_bsd.cpp
+++ b/src/hotspot/os/bsd/os_bsd.cpp
@@ -2600,18 +2600,17 @@ bool os::start_debugging(char *buf, int buflen) {
jio_snprintf(p, buflen-len,
"\n\n"
"Do you want to debug the problem?\n\n"
- "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
- "Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
+ "To debug, run '`lldb -p %d`'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
+ "Enter 'yes' to launch lldb automatically (PATH must include lldb)\n"
"Otherwise, press RETURN to abort...",
- os::current_process_id(), os::current_process_id(),
- os::current_thread_id(), os::current_thread_id());
+ os::current_process_id(), os::current_thread_id(), os::current_thread_id());
bool yes = os::message_box("Unexpected Error", buf);
if (yes) {
// yes, user asked VM to launch debugger
- jio_snprintf(buf, sizeof(buf), "gdb /proc/%d/exe %d",
- os::current_process_id(), os::current_process_id());
+ jio_snprintf(buf, buflen, "lldb -p %d",
+ os::current_process_id());
os::fork_and_exec(buf);
yes = false;
- relates to
-
JDK-8274320 os::fork_and_exec() should be using posix_spawn
-
- Resolved
-