aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-06-21 01:11:49 +0100
committerPedro Alves <palves@redhat.com>2016-06-21 01:11:49 +0100
commitc61db772bf5dc21bf8e0db9acfa8796804f945ab (patch)
tree57bd72d1957279a46220c15035cbd05511bddeff /gdb/infrun.c
parent3c216924d6ae534ea6c2f6bdcc4b42238af52ab1 (diff)
downloadgdb-c61db772bf5dc21bf8e0db9acfa8796804f945ab.zip
gdb-c61db772bf5dc21bf8e0db9acfa8796804f945ab.tar.gz
gdb-c61db772bf5dc21bf8e0db9acfa8796804f945ab.tar.bz2
Always process target events in the main UI
This makes target events always be always processed with the main UI as current UI. This way, warnings, debug output, etc. are always consistently sent to the main console. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * event-top.c (restore_ui_cleanup): Make extern. * infrun.c (fetch_inferior_event): Always switch to the main UI. * top.h (restore_ui_cleanup): Declare.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0925f41..1e9c28e 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3879,6 +3879,12 @@ fetch_inferior_event (void *client_data)
memset (ecs, 0, sizeof (*ecs));
+ /* Events are always processed with the main UI as current UI. This
+ way, warnings, debug output, etc. are always consistently sent to
+ the main console. */
+ make_cleanup (restore_ui_cleanup, current_ui);
+ current_ui = main_ui;
+
/* End up with readline processing input, if necessary. */
make_cleanup (reinstall_readline_callback_handler_cleanup, NULL);