aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/scm-breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-08-11 10:07:18 -0600
committerTom Tromey <tromey@adacore.com>2022-08-31 11:03:39 -0600
commit992aeed80b0a6ef1d60ce01df52f3397c3274f35 (patch)
tree1a7af982504b79000f29ccf44ef52e739b7e1a97 /gdb/guile/scm-breakpoint.c
parent55a6603404099c0b61a5e4613712d3935c2e2bb6 (diff)
downloadbinutils-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/guile/scm-breakpoint.c')
-rw-r--r--gdb/guile/scm-breakpoint.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c
index 5406b74..a779941 100644
--- a/gdb/guile/scm-breakpoint.c
+++ b/gdb/guile/scm-breakpoint.c
@@ -999,10 +999,10 @@ gdbscm_breakpoint_commands (SCM self)
string_file buf;
- current_uiout->redirect (&buf);
gdbscm_gdb_exception exc {};
try
{
+ ui_out_redirect_pop redir (current_uiout, &buf);
print_command_lines (current_uiout, breakpoint_commands (bp), 0);
}
catch (const gdb_exception &except)
@@ -1010,7 +1010,6 @@ gdbscm_breakpoint_commands (SCM self)
exc = unpack (except);
}
- current_uiout->redirect (NULL);
GDBSCM_HANDLE_GDB_EXCEPTION (exc);
result = gdbscm_scm_from_c_string (buf.c_str ());