aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.h
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/ui-out.h
parent55a6603404099c0b61a5e4613712d3935c2e2bb6 (diff)
downloadgdb-992aeed80b0a6ef1d60ce01df52f3397c3274f35.zip
gdb-992aeed80b0a6ef1d60ce01df52f3397c3274f35.tar.gz
gdb-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/ui-out.h')
-rw-r--r--gdb/ui-out.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 1d74da9..65d4087 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -428,15 +428,17 @@ private:
struct ui_out *m_uiout;
};
-/* On destruction, pop the last redirection by calling the uiout's
+/* On construction, redirect a uiout to a given stream. On
+ destruction, pop the last redirection by calling the uiout's
redirect method with a NULL parameter. */
class ui_out_redirect_pop
{
public:
- ui_out_redirect_pop (ui_out *uiout)
+ ui_out_redirect_pop (ui_out *uiout, ui_file *stream)
: m_uiout (uiout)
{
+ m_uiout->redirect (stream);
}
~ui_out_redirect_pop ()