Make raw_stdout be per MI instance
authorPedro Alves <palves@redhat.com>
Tue, 21 Jun 2016 00:11:50 +0000 (01:11 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 21 Jun 2016 00:11:50 +0000 (01:11 +0100)
commit9204d6922cb80f34dd799e57f7f0c74bc86e7027
treee92eead4f49213d5637b2ed4dc10d33298fdeb74
parent05beb2750cd51a0ae1e8bb429aacda567acceba4
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.
gdb/ChangeLog
gdb/interps.c
gdb/interps.h
gdb/mi/mi-cmds.h
gdb/mi/mi-common.h
gdb/mi/mi-interp.c
gdb/mi/mi-main.c
gdb/mi/mi-main.h