This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Make gdb_do_one_event public and fix uiout setting for TUI
Stephane Carrez writes:
> Hi!
>
> Elena Zannoni wrote:
>
> > Stephane Carrez writes:
> > > Hi!
> > >
> > > The TUI relies on the modification of the 'uiout' to switch correctly
> > > between TUI mode and normal mode. It installs its own ui-out function to
> > > catch the output and redirect it in the appropriate curses window.
> > > It installs gdb's normal ui-out function when using the plain terminal
> > > (non-TUI mode).
> >
> >
> > I am a bit confused here about the uiout switch. I see that it does it
> > when you start up the TUI, but there is also a mode switch with
> > tui_switch_mode. How does this interact with your change?
> >
>
> It's because we can switch on/off the TUI mode while gdb is running
> (independently of -tui option).
>
ah ok.
> CTRL-X CTRL-A is bound to tui_switch_mode() which enables TUI mode or
> disable it (the effect is similar to using the gdb -tui option, or, not using that option).
>
> The tui_enable() and tui_disable() do all the necessary stuff such as
> enter/leave the curses mode, install/remove specific TUI gdb hooks.
> The 'uiout' is also switched here so that we write on gdb_stdout
> or in curses window.
>
> Stephane
>
I am not sure I understand this change, can you comment a bit?
a init_ui_hook. */
- uiout = cli_out_new (gdb_stdout);
+ tui_old_uiout = uiout = cli_out_new (gdb_stdout);
Thanks
Elena