diff options
author | Tom Tromey <tromey@adacore.com> | 2022-08-11 10:07:18 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-08-31 11:03:39 -0600 |
commit | 992aeed80b0a6ef1d60ce01df52f3397c3274f35 (patch) | |
tree | 1a7af982504b79000f29ccf44ef52e739b7e1a97 /gdb/breakpoint.c | |
parent | 55a6603404099c0b61a5e4613712d3935c2e2bb6 (diff) | |
download | binutils-992aeed80b0a6ef1d60ce01df52f3397c3274f35.zip binutils-992aeed80b0a6ef1d60ce01df52f3397c3274f35.tar.gz binutils-992aeed80b0a6ef1d60ce01df52f3397c3274f35.tar.bz2 |
Use ui_out_redirect_pop in more places
This changes ui_out_redirect_pop to also perform the redirection, and
then updates several sites to use this, rather than explicit
redirects.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 63feea9..bff3bac 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -14058,18 +14058,9 @@ save_breakpoints (const char *filename, int from_tty, { fp.puts (" commands\n"); - current_uiout->redirect (&fp); - try - { - print_command_lines (current_uiout, tp->commands.get (), 2); - } - catch (const gdb_exception &ex) - { - current_uiout->redirect (NULL); - throw; - } + ui_out_redirect_pop redir (current_uiout, &fp); + print_command_lines (current_uiout, tp->commands.get (), 2); - current_uiout->redirect (NULL); fp.puts (" end\n"); } |