[12/21] gdb/tui: use m_ui instead of current_ui in tui_interp::resume
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
pending
|
Test started
|
Commit Message
No behavior changes expected.
Change-Id: I607a50a7ed83d9afd536d41d6318fc4cd24d8192
---
gdb/tui/tui-interp.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Comments
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> No behavior changes expected.
>
> Change-Id: I607a50a7ed83d9afd536d41d6318fc4cd24d8192
> ---
> gdb/tui/tui-interp.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
> index af99501ac69f..87c079949f4b 100644
> --- a/gdb/tui/tui-interp.c
> +++ b/gdb/tui/tui-interp.c
> @@ -107,23 +107,20 @@ tui_command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
> void
> tui_interp::resume ()
> {
> - struct ui *ui = current_ui;
> - struct ui_file *stream;
> -
> /* gdb_setup_readline will change gdb_stdout. If the TUI was
> previously writing to gdb_stdout, then set it to the new
> gdb_stdout afterwards. */
>
> - stream = tui_old_uiout->set_stream (gdb_stdout);
> + ui_file *stream = tui_old_uiout->set_stream (gdb_stdout);
Same stdout question as for the previous patch.
Thanks,
Andrew
> if (stream != gdb_stdout)
> {
> tui_old_uiout->set_stream (stream);
> stream = NULL;
> }
>
> - gdb_setup_readline (ui, 1);
> + gdb_setup_readline (m_ui, 1);
>
> - ui->input_handler = tui_command_line_handler;
> + m_ui->input_handler = tui_command_line_handler;
>
> if (stream != NULL)
> tui_old_uiout->set_stream (gdb_stdout);
> --
> 2.42.0
@@ -107,23 +107,20 @@ tui_command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
void
tui_interp::resume ()
{
- struct ui *ui = current_ui;
- struct ui_file *stream;
-
/* gdb_setup_readline will change gdb_stdout. If the TUI was
previously writing to gdb_stdout, then set it to the new
gdb_stdout afterwards. */
- stream = tui_old_uiout->set_stream (gdb_stdout);
+ ui_file *stream = tui_old_uiout->set_stream (gdb_stdout);
if (stream != gdb_stdout)
{
tui_old_uiout->set_stream (stream);
stream = NULL;
}
- gdb_setup_readline (ui, 1);
+ gdb_setup_readline (m_ui, 1);
- ui->input_handler = tui_command_line_handler;
+ m_ui->input_handler = tui_command_line_handler;
if (stream != NULL)
tui_old_uiout->set_stream (gdb_stdout);