diff options
author | Pedro Alves <palves@redhat.com> | 2016-06-21 01:11:50 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-06-21 01:11:50 +0100 |
commit | 9204d6922cb80f34dd799e57f7f0c74bc86e7027 (patch) | |
tree | e92eead4f49213d5637b2ed4dc10d33298fdeb74 /gdb/interps.c | |
parent | 05beb2750cd51a0ae1e8bb429aacda567acceba4 (diff) | |
download | gdb-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.c')
-rw-r--r-- | gdb/interps.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/interps.c b/gdb/interps.c index 6eed8f3..ab039ce 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -613,6 +613,16 @@ top_level_interpreter_data (void) return interp->data; } +/* See interps.h. */ + +struct interp * +current_interpreter (void) +{ + struct ui_interp_info *ui_interp = get_interp_info (current_ui); + + return ui_interp->current_interpreter; +} + /* This just adds the "interpreter-exec" command. */ void _initialize_interpreter (void) |