< prev index next >
src/share/vm/utilities/debug.hpp
Print this page
@@ -117,11 +117,10 @@
// compatibility with tools that parse/match the message text.
#define vmassert(p, msg) \
do { \
if (!(p)) { \
report_vm_error(__FILE__, __LINE__, "assert(" #p ") failed", msg); \
- BREAKPOINT; \
} \
} while (0)
#endif
// For backward compatibility.
@@ -145,50 +144,22 @@
// guarantee is also used for Verify options.
#define guarantee(p, msg) \
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 ShouldNotCallThis() \
-do { \
- report_should_not_call(__FILE__, __LINE__); \
- BREAKPOINT; \
-} while (0)
-
-#define ShouldNotReachHere() \
-do { \
- report_should_not_reach_here(__FILE__, __LINE__); \
- BREAKPOINT; \
-} while (0)
+ report_vm_out_of_memory(__FILE__, __LINE__, size, vm_err_type, msg)
-#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
enum VMErrorType {
INTERNAL_ERROR = 0xe0000000,
@@ -197,18 +168,23 @@
};
// 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);
+ATTRIBUTE_NORETURN void report_vm_error_noreturn(const char* file, int line,
+ const char* error_msg,
+ const char* detail_msg = NULL);
+ATTRIBUTE_NORETURN void report_vm_out_of_memory(const char* file, int line, size_t size,
+ VMErrorType vm_err_type, const char* message);
+ATTRIBUTE_NORETURN void report_fatal(const char* file, int line, const char* message);
+ATTRIBUTE_NORETURN void report_should_not_call(const char* file, int line);
+ATTRIBUTE_NORETURN 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
// is convertible to bool. STATIC_ASSERT() can be used anywhere a declaration
// may appear.
< prev index next >