diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-01-16 19:51:51 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-01-16 19:51:51 +0000 |
commit | 6212a5e9adf9e354682882f3e809d391e3a945d5 (patch) | |
tree | b1ff665c2a21970879dc7d4dd3828b075e9bac2b /gdb/exceptions.c | |
parent | 936df4b3c3ffa390e8984801a7c67d7bb93864e7 (diff) | |
download | gdb-6212a5e9adf9e354682882f3e809d391e3a945d5.zip gdb-6212a5e9adf9e354682882f3e809d391e3a945d5.tar.gz gdb-6212a5e9adf9e354682882f3e809d391e3a945d5.tar.bz2 |
2005-01-16 Andrew Cagney <cagney@gnu.org>
* exceptions.c (struct catcher): Delete saved_error_pre_print and
saved_quit_pre_print.
(catcher_init): Delete parameter errstring, do not override the
pre_print strings.
(catcher_pop): Do not restore the pre_print strings.
(catch_exception, catch_exceptions_with_msg, catch_errors)
(catch_command_errors): Update catch_init calls.
Diffstat (limited to 'gdb/exceptions.c')
-rw-r--r-- | gdb/exceptions.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c index bf438b8..d95c58a 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -73,8 +73,6 @@ struct catcher volatile struct exception *exception; /* Saved/current state. */ int mask; - char *saved_error_pre_print; - char *saved_quit_pre_print; struct ui_out *saved_uiout; struct cleanup *saved_cleanup_chain; /* Back link. */ @@ -86,7 +84,6 @@ static struct catcher *current_catcher; static SIGJMP_BUF * catcher_init (struct ui_out *func_uiout, - char *errstring, volatile struct exception *exception, return_mask mask) { @@ -100,14 +97,6 @@ catcher_init (struct ui_out *func_uiout, new_catcher->mask = mask; - /* Override error/quit messages during FUNC. */ - new_catcher->saved_error_pre_print = error_pre_print; - new_catcher->saved_quit_pre_print = quit_pre_print; - if (mask & RETURN_MASK_ERROR) - error_pre_print = errstring; - if (mask & RETURN_MASK_QUIT) - quit_pre_print = errstring; - /* Override the global ``struct ui_out'' builder. */ new_catcher->saved_uiout = uiout; uiout = func_uiout; @@ -137,9 +126,6 @@ catcher_pop (void) uiout = old_catcher->saved_uiout; - quit_pre_print = old_catcher->saved_quit_pre_print; - error_pre_print = old_catcher->saved_error_pre_print; - xfree (old_catcher); } @@ -458,7 +444,7 @@ catch_exception (struct ui_out *uiout, { volatile struct exception exception; SIGJMP_BUF *catch; - catch = catcher_init (uiout, NULL, &exception, mask); + catch = catcher_init (uiout, &exception, mask); for (SIGSETJMP ((*catch)); catcher_state_machine (CATCH_ITER);) (*func) (uiout, func_args); @@ -474,7 +460,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); + SIGJMP_BUF *catch = catcher_init (uiout, &exception, mask); for (SIGSETJMP ((*catch)); catcher_state_machine (CATCH_ITER);) val = (*func) (uiout, func_args); print_any_exception (gdb_stderr, NULL, exception); @@ -503,7 +489,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); + SIGJMP_BUF *catch = catcher_init (uiout, &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". */ @@ -520,7 +506,7 @@ catch_command_errors (catch_command_errors_ftype * command, char *arg, int from_tty, return_mask mask) { volatile struct exception e; - SIGJMP_BUF *catch = catcher_init (uiout, NULL, &e, mask); + SIGJMP_BUF *catch = catcher_init (uiout, &e, mask); for (SIGSETJMP ((*catch)); catcher_state_machine (CATCH_ITER);) command (arg, from_tty); print_any_exception (gdb_stderr, NULL, e); |