aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-interp.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-06-21 01:11:52 +0100
committerPedro Alves <palves@redhat.com>2016-06-21 01:11:52 +0100
commit26cde2cc30c25ba4d5666ea502db51ee6cb5b069 (patch)
tree53fbaa24468a33fab9765222e0ce7cb7ddf3b8d9 /gdb/cli/cli-interp.h
parenta8836c9358a11055a08d11ecacc5d7c8f6d5e7a8 (diff)
downloadgdb-26cde2cc30c25ba4d5666ea502db51ee6cb5b069.zip
gdb-26cde2cc30c25ba4d5666ea502db51ee6cb5b069.tar.gz
gdb-26cde2cc30c25ba4d5666ea502db51ee6cb5b069.tar.bz2
New function should_print_stop_to_console
There's code in the MI interpreter that decides whether a stop should be sent to MI's console stream. Move this check to the CLI interpreter code, so that we can reuse it in both the CLI and TUI interpreters. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * cli/cli-interp.c: Include gdbthread.h and thread-fsm.h. (should_print_stop_to_console): New function, factored out from mi_on_normal_stop_1. * cli/cli-interp.h (should_print_stop_to_console): Declare. * mi/mi-interp.c (mi_on_normal_stop_1): Use should_print_stop_to_console. Pass it the current UI's console interpreter. * mi/mi-main.c (captured_mi_execute_command): Use the INTERP_CONSOLE symbol rather than explicit "console".
Diffstat (limited to 'gdb/cli/cli-interp.h')
-rw-r--r--gdb/cli/cli-interp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/cli/cli-interp.h b/gdb/cli/cli-interp.h
index 85be118..004b967 100644
--- a/gdb/cli/cli-interp.h
+++ b/gdb/cli/cli-interp.h
@@ -24,4 +24,9 @@ extern int cli_interpreter_supports_command_editing (struct interp *interp);
extern void cli_interpreter_pre_command_loop (struct interp *self);
+/* Returns true if the current stop should be printed to
+ CONSOLE_INTERP. */
+extern int should_print_stop_to_console (struct interp *interp,
+ struct thread_info *tp);
+
#endif