Only send sync execution command output to the UI that ran the command
authorPedro Alves <palves@redhat.com>
Tue, 21 Jun 2016 00:11:53 +0000 (01:11 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 21 Jun 2016 00:11:53 +0000 (01:11 +0100)
commiteaae60fd9421cd055c88584bf783942888b8c68e
treea67c8cb55c995f04d2958dc02fcfd426e3fa70ba
parent8980e177bb62ec64875b335cf8733b41f3aae2fd
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.
gdb/ChangeLog
gdb/cli/cli-interp.c
gdb/tui/tui-interp.c