diff options
author | Tom Tromey <tom@tromey.com> | 2018-04-29 23:12:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-25 12:41:01 -0600 |
commit | 29f943408122a7cffa25abb41def99833436f097 (patch) | |
tree | edfa03ab7adfb9f550f106eb02d802b7caf7de45 /gdb/mi | |
parent | 716b8bc52eef6044f1ff361e3e2eeb9307849034 (diff) | |
download | gdb-29f943408122a7cffa25abb41def99833436f097.zip gdb-29f943408122a7cffa25abb41def99833436f097.tar.gz gdb-29f943408122a7cffa25abb41def99833436f097.tar.bz2 |
Remove interp_ui_out
The function interp_ui_out simply calls the interp_ui_out method.
However, if it is passed a NULL interpreter, it first finds the
current interpreter. I believe, though, that NULL is never passed
here, and I think it's simpler to just remove this function and
require callers to be more explicit.
ChangeLog
2018-05-25 Tom Tromey <tom@tromey.com>
* utils.c (fputs_maybe_filtered): Update.
* linespec.c (decode_line_full): Update.
* mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
(mi_print_breakpoint_for_event, mi_solib_loaded)
(mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
(mi_user_selected_context_changed): Update.
* mi/mi-main.c (mi_execute_command): Update.
* cli/cli-script.c (execute_control_command): Update.
* python/python.c (execute_gdb_command): Update.
* solib.c (info_sharedlibrary_command): Update.
* interps.c (interp_ui_out): Remove.
* interps.h (interp_ui_out): Remove.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-interp.c | 16 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 7536817..99ce1eb 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -625,7 +625,7 @@ mi_on_normal_stop_1 (struct bpstats *bs, int print_frame) /* Since this can be called when CLI command is executing, using cli interpreter, be sure to use MI uiout for output, not the current one. */ - struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ()); + struct ui_out *mi_uiout = top_level_interpreter ()->interp_ui_out (); struct mi_interp *mi = (struct mi_interp *) top_level_interpreter (); if (print_frame) @@ -802,7 +802,7 @@ mi_tsv_modified (const struct trace_state_variable *tsv) if (mi == NULL) continue; - mi_uiout = interp_ui_out (top_level_interpreter ()); + mi_uiout = top_level_interpreter ()->interp_ui_out (); target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); @@ -829,7 +829,7 @@ mi_tsv_modified (const struct trace_state_variable *tsv) static void mi_print_breakpoint_for_event (struct mi_interp *mi, breakpoint *bp) { - ui_out *mi_uiout = interp_ui_out (mi); + ui_out *mi_uiout = mi->interp_ui_out (); /* We want the output from print_breakpoint to go to mi->event_channel. One approach would be to just call @@ -1090,7 +1090,7 @@ mi_solib_loaded (struct so_list *solib) if (mi == NULL) continue; - uiout = interp_ui_out (top_level_interpreter ()); + uiout = top_level_interpreter ()->interp_ui_out (); target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); @@ -1118,7 +1118,7 @@ mi_solib_unloaded (struct so_list *solib) if (mi == NULL) continue; - uiout = interp_ui_out (top_level_interpreter ()); + uiout = top_level_interpreter ()->interp_ui_out (); target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); @@ -1157,7 +1157,7 @@ mi_command_param_changed (const char *param, const char *value) if (mi == NULL) continue; - mi_uiout = interp_ui_out (top_level_interpreter ()); + mi_uiout = top_level_interpreter ()->interp_ui_out (); target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); @@ -1193,7 +1193,7 @@ mi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr, if (mi == NULL) continue; - mi_uiout = interp_ui_out (top_level_interpreter ()); + mi_uiout = top_level_interpreter ()->interp_ui_out (); target_terminal::scoped_restore_terminal_state term_state; target_terminal::ours_for_output (); @@ -1246,7 +1246,7 @@ mi_user_selected_context_changed (user_selected_what selection) if (mi == NULL) continue; - mi_uiout = interp_ui_out (top_level_interpreter ()); + mi_uiout = top_level_interpreter ()->interp_ui_out (); mi_uiout->redirect (mi->event_channel); ui_out_redirect_pop redirect_popper (mi_uiout); diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 13556d4..76e783d 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1993,7 +1993,7 @@ mi_execute_command (const char *cmd, int from_tty) if (/* The notifications are only output when the top-level interpreter (specified on the command line) is MI. */ - interp_ui_out (top_level_interpreter ())->is_mi_like_p () + top_level_interpreter ()->interp_ui_out ()->is_mi_like_p () /* Don't try report anything if there are no threads -- the program is dead. */ && thread_count () != 0 |