diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-01-15 06:03:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-01-15 06:03:34 +0000 |
commit | 3af1e0e30048cd3d219ae1772467f96b7cd8f89e (patch) | |
tree | 5a666dc49905318aa8cef951b6423fdb1b758262 /gdb/exceptions.c | |
parent | e48f5bee49d3c14ad0cdae307f3c708d68f91e84 (diff) | |
download | gdb-3af1e0e30048cd3d219ae1772467f96b7cd8f89e.zip gdb-3af1e0e30048cd3d219ae1772467f96b7cd8f89e.tar.gz gdb-3af1e0e30048cd3d219ae1772467f96b7cd8f89e.tar.bz2 |
2005-01-15 Andrew Cagney <cagney@gnu.org>
* exceptions.c (struct catcher): Delete field print_message.
(catcher_init): Delete print_message parameter.
(catch_exception, catch_exceptions_with_msg, catch_errors): Update.
(throw_it): Delete prefix parameter.
(throw_verror, throw_vfatal, throw_error): Update.
Diffstat (limited to 'gdb/exceptions.c')
-rw-r--r-- | gdb/exceptions.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 0700812..5833752 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -71,11 +71,6 @@ struct catcher SIGJMP_BUF buf; /* Status buffer belonging to the exception handler. */ volatile struct exception *exception; - /* Should the error / quit message be printed? Old code assumes - that this file prints the error/quit message when first reported. - New code instead directly handles the printing of error/quit - messages. */ - int print_message; /* Saved/current state. */ int mask; char *saved_error_pre_print; @@ -93,8 +88,7 @@ static SIGJMP_BUF * catcher_init (struct ui_out *func_uiout, char *errstring, volatile struct exception *exception, - return_mask mask, - int print_message) + return_mask mask) { struct catcher *new_catcher = XZALLOC (struct catcher); @@ -105,7 +99,6 @@ catcher_init (struct ui_out *func_uiout, new_catcher->exception = exception; new_catcher->mask = mask; - new_catcher->print_message = print_message; /* Override error/quit messages during FUNC. */ new_catcher->saved_error_pre_print = error_pre_print; @@ -374,11 +367,11 @@ print_any_exception (struct ui_file *file, const char *prefix, } NORETURN static void -throw_it (enum return_reason reason, enum errors error, const char *prefix, - const char *fmt, va_list ap) ATTR_NORETURN; +throw_it (enum return_reason reason, enum errors error, const char *fmt, + va_list ap) ATTR_NORETURN; NORETURN static void -throw_it (enum return_reason reason, enum errors error, const char *prefix, - const char *fmt, va_list ap) +throw_it (enum return_reason reason, enum errors error, const char *fmt, + va_list ap) { struct exception e; @@ -398,13 +391,13 @@ throw_it (enum return_reason reason, enum errors error, const char *prefix, NORETURN void throw_verror (enum errors error, const char *fmt, va_list ap) { - throw_it (RETURN_ERROR, error, error_pre_print, fmt, ap); + throw_it (RETURN_ERROR, error, fmt, ap); } NORETURN void throw_vfatal (const char *fmt, va_list ap) { - throw_it (RETURN_QUIT, NO_ERROR, quit_pre_print, fmt, ap); + throw_it (RETURN_QUIT, NO_ERROR, fmt, ap); } NORETURN void @@ -412,7 +405,7 @@ throw_error (enum errors error, const char *fmt, ...) { va_list args; va_start (args, fmt); - throw_it (RETURN_ERROR, error, error_pre_print, fmt, args); + throw_it (RETURN_ERROR, error, fmt, args); va_end (args); } @@ -465,7 +458,7 @@ catch_exception (struct ui_out *uiout, { volatile struct exception exception; SIGJMP_BUF *catch; - catch = catcher_init (uiout, NULL, &exception, mask, 0); + catch = catcher_init (uiout, NULL, &exception, mask); for (SIGSETJMP ((*catch)); catcher_state_machine (CATCH_ITER);) (*func) (uiout, func_args); @@ -481,7 +474,7 @@ catch_exceptions_with_msg (struct ui_out *uiout, { volatile struct exception exception; volatile int val = 0; - SIGJMP_BUF *catch = catcher_init (uiout, NULL, &exception, mask, 1); + SIGJMP_BUF *catch = catcher_init (uiout, NULL, &exception, mask); for (SIGSETJMP ((*catch)); catcher_state_machine (CATCH_ITER);) val = (*func) (uiout, func_args); print_any_exception (gdb_stderr, NULL, exception); @@ -510,7 +503,7 @@ catch_errors (catch_errors_ftype *func, void *func_args, char *errstring, { volatile int val = 0; volatile struct exception exception; - SIGJMP_BUF *catch = catcher_init (uiout, errstring, &exception, mask, 1); + SIGJMP_BUF *catch = catcher_init (uiout, errstring, &exception, mask); /* This illustrates how it is possible to nest the mechanism and hence catch "break". Of course this doesn't address the need to also catch "return". */ |