From 992aeed80b0a6ef1d60ce01df52f3397c3274f35 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 11 Aug 2022 10:07:18 -0600 Subject: 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. --- gdb/ui-out.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/ui-out.h') 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 () -- cgit v1.1