src/share/vm/utilities/vmError.cpp

Print this page
rev 2110 : [mq]: is-debugger-present


 785   static int recursive_error_count;
 786 
 787   // We will first print a brief message to standard out (verbose = false),
 788   // then save detailed information in log file (verbose = true).
 789   static bool out_done = false;         // done printing to standard out
 790   static bool log_done = false;         // done saving error log
 791   static bool transmit_report_done = false; // done error reporting
 792   static fdStream log;                  // error log
 793 
 794   if (SuppressFatalErrorMessage) {
 795       os::abort();
 796   }
 797   jlong mytid = os::current_thread_id();
 798   if (first_error == NULL &&
 799       Atomic::cmpxchg_ptr(this, &first_error, NULL) == NULL) {
 800 
 801     // first time
 802     first_error_tid = mytid;
 803     set_error_reported();
 804 
 805     if (ShowMessageBoxOnError) {


 806       show_message_box(buffer, sizeof(buffer));
 807 
 808       // User has asked JVM to abort. Reset ShowMessageBoxOnError so the
 809       // WatcherThread can kill JVM if the error handler hangs.
 810       ShowMessageBoxOnError = false;
 811     }
 812 
 813     // Write a minidump on Windows, check core dump limits on Linux/Solaris
 814     os::check_or_create_dump(_siginfo, _context, buffer, sizeof(buffer));
 815 
 816     // reset signal handlers or exception filter; make sure recursive crashes
 817     // are handled properly.
 818     reset_signal_handlers();
 819 
 820   } else {
 821     // If UseOsErrorReporting we call this for each level of the call stack
 822     // while searching for the exception handler.  Only the first level needs
 823     // to be reported.
 824     if (UseOSErrorReporting && log_done) return;
 825 




 785   static int recursive_error_count;
 786 
 787   // We will first print a brief message to standard out (verbose = false),
 788   // then save detailed information in log file (verbose = true).
 789   static bool out_done = false;         // done printing to standard out
 790   static bool log_done = false;         // done saving error log
 791   static bool transmit_report_done = false; // done error reporting
 792   static fdStream log;                  // error log
 793 
 794   if (SuppressFatalErrorMessage) {
 795       os::abort();
 796   }
 797   jlong mytid = os::current_thread_id();
 798   if (first_error == NULL &&
 799       Atomic::cmpxchg_ptr(this, &first_error, NULL) == NULL) {
 800 
 801     // first time
 802     first_error_tid = mytid;
 803     set_error_reported();
 804 
 805     if (ShowMessageBoxOnError ||
 806       (Arguments::created_by_gamma_launcher() && PauseAtExit && os::is_debugger_attached()))
 807     {
 808       show_message_box(buffer, sizeof(buffer));
 809 
 810       // User has asked JVM to abort. Reset ShowMessageBoxOnError so the
 811       // WatcherThread can kill JVM if the error handler hangs.
 812       ShowMessageBoxOnError = false;
 813     }
 814 
 815     // Write a minidump on Windows, check core dump limits on Linux/Solaris
 816     os::check_or_create_dump(_siginfo, _context, buffer, sizeof(buffer));
 817 
 818     // reset signal handlers or exception filter; make sure recursive crashes
 819     // are handled properly.
 820     reset_signal_handlers();
 821 
 822   } else {
 823     // If UseOsErrorReporting we call this for each level of the call stack
 824     // while searching for the exception handler.  Only the first level needs
 825     // to be reported.
 826     if (UseOSErrorReporting && log_done) return;
 827