< prev index next >

src/hotspot/share/utilities/vmError.hpp

Print this page
rev 49276 : 8191101: Show register content in hs-err file on assert
Reviewed-by:
   1 /*
   2  * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 141 
 142 public:
 143 
 144   // return a string to describe the error
 145   static char* error_string(char* buf, int buflen);
 146 
 147   // Record status of core/minidump
 148   static void record_coredump_status(const char* message, bool status);
 149 
 150   // support for VM.info diagnostic command
 151   static void print_vm_info(outputStream* st);
 152 
 153   // main error reporting function
 154   static void report_and_die(int id, const char* message, const char* detail_fmt, va_list detail_args,
 155                              Thread* thread, address pc, void* siginfo, void* context,
 156                              const char* filename, int lineno, size_t size) ATTRIBUTE_PRINTF(3, 0);
 157 
 158   static void report_and_die(Thread* thread, unsigned int sig, address pc,
 159                              void* siginfo, void* context);
 160 
 161   static void report_and_die(Thread* thread,const char* filename, int lineno, const char* message,
 162                              const char* detail_fmt, va_list detail_args) ATTRIBUTE_PRINTF(5, 0);
 163 
 164   static void report_and_die(Thread* thread, const char* filename, int lineno, size_t size,
 165                              VMErrorType vm_err_type, const char* detail_fmt,
 166                              va_list detail_args) ATTRIBUTE_PRINTF(6, 0);
 167 
 168   static void report_and_die(const char* message);
 169 
 170   // reporting OutOfMemoryError
 171   static void report_java_out_of_memory(const char* message);
 172 
 173   // returns original flags for signal, if it was resetted, or -1 if
 174   // signal was not changed by error reporter
 175   static int get_resetted_sigflags(int sig);
 176 
 177   // returns original handler for signal, if it was resetted, or NULL if
 178   // signal was not changed by error reporter
 179   static address get_resetted_sighandler(int sig);
 180 
 181   // check to see if fatal error reporting is in progress
 182   static bool fatal_error_in_progress() { return first_error_tid != -1; }
   1 /*
   2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 141 
 142 public:
 143 
 144   // return a string to describe the error
 145   static char* error_string(char* buf, int buflen);
 146 
 147   // Record status of core/minidump
 148   static void record_coredump_status(const char* message, bool status);
 149 
 150   // support for VM.info diagnostic command
 151   static void print_vm_info(outputStream* st);
 152 
 153   // main error reporting function
 154   static void report_and_die(int id, const char* message, const char* detail_fmt, va_list detail_args,
 155                              Thread* thread, address pc, void* siginfo, void* context,
 156                              const char* filename, int lineno, size_t size) ATTRIBUTE_PRINTF(3, 0);
 157 
 158   static void report_and_die(Thread* thread, unsigned int sig, address pc,
 159                              void* siginfo, void* context);
 160 
 161   static void report_and_die(Thread* thread, void* context, const char* filename, int lineno, const char* message,
 162                              const char* detail_fmt, va_list detail_args) ATTRIBUTE_PRINTF(6, 0);
 163 
 164   static void report_and_die(Thread* thread, const char* filename, int lineno, size_t size,
 165                              VMErrorType vm_err_type, const char* detail_fmt,
 166                              va_list detail_args) ATTRIBUTE_PRINTF(6, 0);
 167 
 168   static void report_and_die(const char* message);
 169 
 170   // reporting OutOfMemoryError
 171   static void report_java_out_of_memory(const char* message);
 172 
 173   // returns original flags for signal, if it was resetted, or -1 if
 174   // signal was not changed by error reporter
 175   static int get_resetted_sigflags(int sig);
 176 
 177   // returns original handler for signal, if it was resetted, or NULL if
 178   // signal was not changed by error reporter
 179   static address get_resetted_sighandler(int sig);
 180 
 181   // check to see if fatal error reporting is in progress
 182   static bool fatal_error_in_progress() { return first_error_tid != -1; }
< prev index next >