[06/21] gdb: uncover some current_ui uses in interp_set

Message ID 20230908190227.96319-7-simon.marchi@efficios.com
State New
Headers
Series ui / interp cleansup |

Commit Message

Simon Marchi Sept. 8, 2023, 6:23 p.m. UTC
  A following patch will make interp_set a method of struct ui.  Before
doing this, I'd like to uncover all the hidden uses of current_ui, as
they will be replaced with a passed-in `ui` parameter, and then `this`.
So, replace uses of the current_uiout macro with the long form.

Change-Id: I8de2e6a451de11ff9040322bd0869021171dcf7f
---
 gdb/interps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdb/interps.c b/gdb/interps.c
index bd95c3175adb..9d27d6a2bd2c 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -102,7 +102,7 @@  interp_set (struct interp *interp, bool top_level)
 
   if (old_interp != NULL)
     {
-      current_uiout->flush ();
+      current_ui->m_current_uiout->flush ();
       old_interp->suspend ();
     }
 
@@ -126,7 +126,7 @@  interp_set (struct interp *interp, bool top_level)
     }
 
   /* Do this only after the interpreter is initialized.  */
-  current_uiout = interp->interp_ui_out ();
+  current_ui->m_current_uiout = interp->interp_ui_out ();
 
   /* Clear out any installed interpreter hooks/event handlers.  */
   clear_interpreter_hooks ();