mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7022037: Pause when exiting if debugger is attached on windows
Reviewed-by: dsamersoff, kamg, hosterda
This commit is contained in:
parent
52708b0603
commit
cc6f461357
11 changed files with 63 additions and 5 deletions
|
@ -1788,7 +1788,7 @@ void os::jvm_path(char *buf, jint buflen) {
|
|||
}
|
||||
|
||||
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,19 @@ void os::win32::setmode_streams() {
|
|||
}
|
||||
|
||||
|
||||
bool os::is_debugger_attached() {
|
||||
return IsDebuggerPresent() ? true : false;
|
||||
}
|
||||
|
||||
|
||||
void os::wait_for_keypress_at_exit(void) {
|
||||
if (PauseAtExit) {
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue