aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/cli/cli-interp.c10
-rw-r--r--gdb/tui/tui-interp.c11
3 files changed, 23 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cf50f9d..cd147a6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2016-06-21 Pedro Alves <palves@redhat.com>
+
* breakpoint.c (new_until_break_fsm): Add 'cmd_interp' parameter.
(until_break_fsm_should_stop, until_break_fsm_clean_up): Add
thread parameter.
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 97fd713..5d67ba4 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -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);
}
}
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 4996db9..3856382 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -32,6 +32,7 @@
#include "tui/tui-io.h"
#include "infrun.h"
#include "observer.h"
+#include "gdbthread.h"
static struct ui_out *tui_ui_out (struct interp *self);
@@ -71,14 +72,20 @@ tui_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 interp *tui = as_tui_interp (top_level_interpreter ());
+ struct interp *interp = top_level_interpreter ();
+ struct interp *tui = as_tui_interp (interp);
+ struct thread_info *thread;
if (tui == NULL)
continue;
- if (print_frame)
+ thread = inferior_thread ();
+ if (should_print_stop_to_console (interp, thread))
print_stop_event (tui_ui_out (tui));
}
}