< prev index next >

src/os/windows/vm/vmError_windows.cpp

Print this page




  54       // exception. If VM is running inside a debugger, the debugger will
  55       // catch the exception. Otherwise, the breakpoint exception will reach
  56       // the default windows exception handler, which can spawn a debugger and
  57       // automatically attach to the dying VM.
  58       os::breakpoint();
  59       yes = false;
  60     }
  61   } while (yes);
  62 }
  63 
  64 int VMError::get_resetted_sigflags(int sig) {
  65   return -1;
  66 }
  67 
  68 address VMError::get_resetted_sighandler(int sig) {
  69   return NULL;
  70 }
  71 
  72 LONG WINAPI crash_handler(struct _EXCEPTION_POINTERS* exceptionInfo) {
  73   DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode;
  74   VMError::report_and_die(NULL, exception_code, NULL,
  75                 exceptionInfo->ExceptionRecord, exceptionInfo->ContextRecord);
  76   return EXCEPTION_CONTINUE_SEARCH;
  77 }
  78 
  79 void VMError::reset_signal_handlers() {
  80   SetUnhandledExceptionFilter(crash_handler);
  81 }


  54       // exception. If VM is running inside a debugger, the debugger will
  55       // catch the exception. Otherwise, the breakpoint exception will reach
  56       // the default windows exception handler, which can spawn a debugger and
  57       // automatically attach to the dying VM.
  58       os::breakpoint();
  59       yes = false;
  60     }
  61   } while (yes);
  62 }
  63 
  64 int VMError::get_resetted_sigflags(int sig) {
  65   return -1;
  66 }
  67 
  68 address VMError::get_resetted_sighandler(int sig) {
  69   return NULL;
  70 }
  71 
  72 LONG WINAPI crash_handler(struct _EXCEPTION_POINTERS* exceptionInfo) {
  73   DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode;
  74   VMError::report_and_die(NULL, exception_code, NULL, exceptionInfo->ExceptionRecord,
  75                           exceptionInfo->ContextRecord);
  76   return EXCEPTION_CONTINUE_SEARCH;
  77 }
  78 
  79 void VMError::reset_signal_handlers() {
  80   SetUnhandledExceptionFilter(crash_handler);
  81 }
< prev index next >