1.1 --- a/src/share/vm/utilities/vmError.cpp Tue Feb 08 22:27:57 2011 -0800 1.2 +++ b/src/share/vm/utilities/vmError.cpp Wed Feb 09 11:08:10 2011 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -201,6 +201,15 @@ 1.11 out->print_raw_cr("#"); 1.12 } 1.13 1.14 +bool VMError::coredump_status; 1.15 +char VMError::coredump_message[O_BUFLEN]; 1.16 + 1.17 +void VMError::report_coredump_status(const char* message, bool status) { 1.18 + coredump_status = status; 1.19 + strncpy(coredump_message, message, sizeof(coredump_message)); 1.20 + coredump_message[sizeof(coredump_message)-1] = 0; 1.21 +} 1.22 + 1.23 1.24 // Return a string to describe the error 1.25 char* VMError::error_string(char* buf, int buflen) { 1.26 @@ -454,6 +463,15 @@ 1.27 st->cr(); 1.28 st->print_cr("#"); 1.29 } 1.30 + STEP(63, "(printing core file information)") 1.31 + st->print("# "); 1.32 + if (coredump_status) { 1.33 + st->print("Core dump written. Default location: %s", coredump_message); 1.34 + } else { 1.35 + st->print("Failed to write core dump. %s", coredump_message); 1.36 + } 1.37 + st->print_cr(""); 1.38 + st->print_cr("#"); 1.39 1.40 STEP(65, "(printing bug submit message)") 1.41 1.42 @@ -792,6 +810,9 @@ 1.43 ShowMessageBoxOnError = false; 1.44 } 1.45 1.46 + // Write a minidump on Windows, check core dump limits on Linux/Solaris 1.47 + os::check_or_create_dump(_siginfo, _context, buffer, sizeof(buffer)); 1.48 + 1.49 // reset signal handlers or exception filter; make sure recursive crashes 1.50 // are handled properly. 1.51 reset_signal_handlers();