forked from Imagelibrary/binutils-gdb
Only send sync execution command output to the UI that ran the command
Currently when a "step", "next", etc. finishes, the current source line is printed on all console UIs. This patch makes the CLI and TUI interpreters reuse MI's logic to only emit console output related to a synchronous command on the console-like interpreter that started the command in the first place. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * cli/cli-interp.c (cli_on_normal_stop): Bail out early if there's nothing to print. Use should_print_stop_to_console. * tui/tui-interp.c (tui_on_normal_stop): Likewise.
This commit is contained in:
@@ -95,14 +95,20 @@ cli_on_normal_stop (struct bpstats *bs, int print_frame)
|
||||
{
|
||||
struct switch_thru_all_uis state;
|
||||
|
||||
if (!print_frame)
|
||||
return;
|
||||
|
||||
SWITCH_THRU_ALL_UIS (state)
|
||||
{
|
||||
struct cli_interp *cli = as_cli_interp (top_level_interpreter ());
|
||||
struct interp *interp = top_level_interpreter ();
|
||||
struct cli_interp *cli = as_cli_interp (interp);
|
||||
struct thread_info *thread;
|
||||
|
||||
if (cli == NULL)
|
||||
continue;
|
||||
|
||||
if (print_frame)
|
||||
thread = inferior_thread ();
|
||||
if (should_print_stop_to_console (interp, thread))
|
||||
print_stop_event (cli->cli_uiout);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user