equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
197 if (jt->thread_state() == _thread_in_native) { |
197 if (jt->thread_state() == _thread_in_native) { |
198 out->print_cr("# The crash happened outside the Java Virtual Machine in native code.\n# See problematic frame for where to report the bug."); |
198 out->print_cr("# The crash happened outside the Java Virtual Machine in native code.\n# See problematic frame for where to report the bug."); |
199 } |
199 } |
200 } |
200 } |
201 out->print_raw_cr("#"); |
201 out->print_raw_cr("#"); |
|
202 } |
|
203 |
|
204 bool VMError::coredump_status; |
|
205 char VMError::coredump_message[O_BUFLEN]; |
|
206 |
|
207 void VMError::report_coredump_status(const char* message, bool status) { |
|
208 coredump_status = status; |
|
209 strncpy(coredump_message, message, sizeof(coredump_message)); |
|
210 coredump_message[sizeof(coredump_message)-1] = 0; |
202 } |
211 } |
203 |
212 |
204 |
213 |
205 // Return a string to describe the error |
214 // Return a string to describe the error |
206 char* VMError::error_string(char* buf, int buflen) { |
215 char* VMError::error_string(char* buf, int buflen) { |
452 frame fr = os::fetch_frame_from_context(_context); |
461 frame fr = os::fetch_frame_from_context(_context); |
453 fr.print_on_error(st, buf, sizeof(buf)); |
462 fr.print_on_error(st, buf, sizeof(buf)); |
454 st->cr(); |
463 st->cr(); |
455 st->print_cr("#"); |
464 st->print_cr("#"); |
456 } |
465 } |
|
466 STEP(63, "(printing core file information)") |
|
467 st->print("# "); |
|
468 if (coredump_status) { |
|
469 st->print("Core dump written. Default location: %s", coredump_message); |
|
470 } else { |
|
471 st->print("Failed to write core dump. %s", coredump_message); |
|
472 } |
|
473 st->print_cr(""); |
|
474 st->print_cr("#"); |
457 |
475 |
458 STEP(65, "(printing bug submit message)") |
476 STEP(65, "(printing bug submit message)") |
459 |
477 |
460 if (should_report_bug(_id) && _verbose) { |
478 if (should_report_bug(_id) && _verbose) { |
461 print_bug_submit_message(st, _thread); |
479 print_bug_submit_message(st, _thread); |
789 |
807 |
790 // User has asked JVM to abort. Reset ShowMessageBoxOnError so the |
808 // User has asked JVM to abort. Reset ShowMessageBoxOnError so the |
791 // WatcherThread can kill JVM if the error handler hangs. |
809 // WatcherThread can kill JVM if the error handler hangs. |
792 ShowMessageBoxOnError = false; |
810 ShowMessageBoxOnError = false; |
793 } |
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)); |
794 |
815 |
795 // reset signal handlers or exception filter; make sure recursive crashes |
816 // reset signal handlers or exception filter; make sure recursive crashes |
796 // are handled properly. |
817 // are handled properly. |
797 reset_signal_handlers(); |
818 reset_signal_handlers(); |
798 |
819 |