--- old/src/os/windows/vm/os_windows.cpp 2011-02-25 15:52:46.256716900 +0100 +++ new/src/os/windows/vm/os_windows.cpp 2011-02-25 15:52:45.814691700 +0100 @@ -1788,7 +1788,7 @@ } buf[0] = '\0'; - if (strcmp(Arguments::sun_java_launcher(), "gamma") == 0) { + if (Arguments::created_by_gamma_launcher()) { // Support for the gamma launcher. Check for an // JAVA_HOME environment variable // and fix up the path so it looks like @@ -3418,6 +3418,20 @@ } +bool os::is_debugger_attached() { + return IsDebuggerPresent() ? true : false; +} + + +void os::check_for_debugger_and_wait(void) { + // if running in a debugger on windows, we want to pause before the console is closed + if (PauseAtExit && os::is_debugger_attached()) { + fprintf(stderr, "Press any key to continue...\n"); + fgetc(stdin); + } +} + + int os::message_box(const char* title, const char* message) { int result = MessageBox(NULL, message, title, MB_YESNO | MB_ICONERROR | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);