--- old/src/share/vm/utilities/debug.hpp 2015-04-15 12:34:21.885955851 +0200 +++ new/src/share/vm/utilities/debug.hpp 2015-04-15 12:34:21.721950338 +0200 @@ -119,7 +119,6 @@ do { \ if (!(p)) { \ report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \ - BREAKPOINT; \ } \ } while (0) #endif @@ -147,46 +146,18 @@ do { \ if (!(p)) { \ report_vm_error(__FILE__, __LINE__, "guarantee(" #p ") failed", msg); \ - BREAKPOINT; \ } \ } while (0) -#define fatal(msg) \ -do { \ - report_fatal(__FILE__, __LINE__, msg); \ - BREAKPOINT; \ -} while (0) - // out of memory -#define vm_exit_out_of_memory(size, vm_err_type, msg) \ -do { \ - report_vm_out_of_memory(__FILE__, __LINE__, size, vm_err_type, msg); \ - BREAKPOINT; \ -} while (0) +#define vm_exit_out_of_memory(size, vm_err_type, msg) \ + report_vm_out_of_memory(__FILE__, __LINE__, size, vm_err_type, msg) -#define ShouldNotCallThis() \ -do { \ - report_should_not_call(__FILE__, __LINE__); \ - BREAKPOINT; \ -} while (0) - -#define ShouldNotReachHere() \ -do { \ - report_should_not_reach_here(__FILE__, __LINE__); \ - BREAKPOINT; \ -} while (0) - -#define Unimplemented() \ -do { \ - report_unimplemented(__FILE__, __LINE__); \ - BREAKPOINT; \ -} while (0) - -#define Untested(msg) \ -do { \ - report_untested(__FILE__, __LINE__, msg); \ - BREAKPOINT; \ -} while (0); +#define fatal(msg) report_fatal(__FILE__, __LINE__, msg) +#define ShouldNotCallThis() report_should_not_call(__FILE__, __LINE__) +#define ShouldNotReachHere() report_should_not_reach_here(__FILE__, __LINE__) +#define Unimplemented() report_unimplemented(__FILE__, __LINE__) +#define Untested(msg) report_untested(__FILE__, __LINE__, msg) // types of VM error - originally in vmError.hpp @@ -199,14 +170,19 @@ // error reporting helper functions void report_vm_error(const char* file, int line, const char* error_msg, const char* detail_msg = NULL); -void report_fatal(const char* file, int line, const char* message); -void report_vm_out_of_memory(const char* file, int line, size_t size, - VMErrorType vm_err_type, const char* message); -void report_should_not_call(const char* file, int line); -void report_should_not_reach_here(const char* file, int line); + void report_unimplemented(const char* file, int line); void report_untested(const char* file, int line, const char* message); +NORETURN_ATTRIBUTE(void report_vm_error_noreturn(const char* file, int line, + const char* error_msg, + const char* detail_msg = NULL)); +NORETURN_ATTRIBUTE(void report_vm_out_of_memory(const char* file, int line, size_t size, + VMErrorType vm_err_type, const char* message)); +NORETURN_ATTRIBUTE(void report_fatal(const char* file, int line, const char* message)); +NORETURN_ATTRIBUTE(void report_should_not_call(const char* file, int line)); +NORETURN_ATTRIBUTE(void report_should_not_reach_here(const char* file, int line)); + void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2); // Compile-time asserts. Cond must be a compile-time constant expression that