aboutsummaryrefslogtreecommitdiff
path: root/gdb/interps.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-06-21 01:11:50 +0100
committerPedro Alves <palves@redhat.com>2016-06-21 01:11:50 +0100
commit9204d6922cb80f34dd799e57f7f0c74bc86e7027 (patch)
treee92eead4f49213d5637b2ed4dc10d33298fdeb74 /gdb/interps.h
parent05beb2750cd51a0ae1e8bb429aacda567acceba4 (diff)
downloadgdb-9204d6922cb80f34dd799e57f7f0c74bc86e7027.zip
gdb-9204d6922cb80f34dd799e57f7f0c74bc86e7027.tar.gz
gdb-9204d6922cb80f34dd799e57f7f0c74bc86e7027.tar.bz2
Make raw_stdout be per MI instance
Each MI instance should obviously have its own raw output channel, along with save_raw_stdout. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * interps.c (current_interpreter): New function. * interps.h (current_interpreter): New declaration. * mi/mi-cmds.h (raw_stdout): Delete declaration. * mi/mi-common.h (struct mi_interp) <raw_stdout, saved_raw_stdout>: New field. * mi/mi-interp.c (display_mi_prompt): New parameter 'mi'. Adjust to per-UI raw_stdout. (mi_interpreter_init): Adjust to per-UI raw_stdout. (mi_on_sync_execution_done, mi_execute_command_input_handler) (mi_command_loop): Pass MI instance to display_mi_prompt. (mi_on_normal_stop_1, mi_output_running_pid, mi_on_resume_1) (mi_on_resume): Adjust to per-UI raw_stdout. (saved_raw_stdout): Delete. (mi_set_logging): Adjust to per-UI raw_stdout and saved_raw_stdout. * mi/mi-main.c (raw_stdout): Delete. (mi_cmd_gdb_exit, captured_mi_execute_command) (mi_print_exception, mi_load_progress): Adjust to per-UI raw_stdout. (print_diff_now, mi_print_timing_maybe): New ui_file parameter. Pass it along. (print_diff): New ui_file parameter. Send output there instead of raw_stdout. * mi/mi-main.h (struct ui_file): Forward declare. (mi_print_timing_maybe): Add ui_file parameter.
Diffstat (limited to 'gdb/interps.h')
-rw-r--r--gdb/interps.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/interps.h b/gdb/interps.h
index adccbb5..eba3387 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -116,6 +116,9 @@ extern int current_interp_set_logging (int start_log, struct ui_file *out,
extern void *top_level_interpreter_data (void);
extern struct interp *top_level_interpreter (void);
+/* Return the current UI's current interpreter. */
+extern struct interp *current_interpreter (void);
+
extern struct interp *command_interp (void);
extern void clear_interpreter_hooks (void);