aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-08-04 19:10:14 +0000
committerPedro Alves <palves@redhat.com>2011-08-04 19:10:14 +0000
commit79a45e254f090b628473614054ed318d70409239 (patch)
tree895d3401ff636850ce886625217c84259cbb791f /gdb/cli
parentf9679975a3374a650ce5ffc8a512b85d662bfcbf (diff)
downloadgdb-79a45e254f090b628473614054ed318d70409239.zip
gdb-79a45e254f090b628473614054ed318d70409239.tar.gz
gdb-79a45e254f090b628473614054ed318d70409239.tar.bz2
2011-08-04 Pedro Alves <pedro@codesourcery.com>
* ui-out.h (uiout): Rename to ... (current_uiout): ... this. * ui-out.c (uiout): Rename to ... (current_uiout): ... this. * ada-lang.c (print_it_exception, print_one_exception) (print_mention_exception): Adjust. * breakpoint.c (watchpoint_check): Adjust. (print_breakpoint_location, print_one_breakpoint, breakpoint_1) (default_collect_info, watchpoints_info, print_one_catch_fork) (print_one_catch_vfork, print_one_catch_syscall) (print_one_catch_exec, mention, print_it_ranged_breakpoint) (print_one_ranged_breakpoint, print_mention_ranged_breakpoint) (print_it_watchpoint, print_mention_watchpoint) (print_it_masked_watchpoint, print_mention_masked_watchpoint) (print_it_exception_catchpoint, print_one_exception_catchpoint) (print_mention_exception_catchpoint, say_where, bkpt_print_it) (bkpt_print_mention, momentary_bkpt_print_it) (tracepoint_print_mention, update_static_tracepoint) (tracepoints_info, save_breakpoints): Adjust. * cli-out.c (field_separator): Adjust. * cp-abi.c (list_cp_abis, show_cp_abi_cmd): Adjust. * exceptions.c (catch_exceptions_with_msg, catch_errors): Adjust. * frame.c (get_current_frame): Adjust. * infcmd.c (run_command_1, print_return_value): Adjust. * inferior.c (inferior_command, info_inferiors_command): Adjust. * infrun.c (print_end_stepping_range_reason): Adjust. (print_signal_exited_reason, print_exited_reason): Adjust. (print_signal_received_reason, print_no_history_reason): Adjust. * interps.c (interp_set): Adjust. * osdata.c (info_osdata_command): Adjust. * progspace.c (maintenance_info_program_spaces_command): Adjust. * remote-fileio.c (remote_fileio_request): Adjust. * remote.c (show_remote_cmd): Adjust. * solib.c (info_sharedlibrary_command): Adjust. * source.c (print_source_lines_base): Adjust. * stack.c (print_stack_frame): Adjust. (do_gdb_disassembly, print_frame_info, print_frame): Adjust. * symfile-mem.c (add_vsyscall_page): Adjust. * symfile.c (load_progress, generic_load) (print_transfer_performance): Adjust. * thread.c (info_threads_command, restore_selected_frame) (thread_command): Adjust. * top.c (make_cleanup_restore_ui_file): Adjust. * tracepoint.c (tvariables_info_1, trace_status_mi, tfind_1) (print_one_static_tracepoint_marker): Adjust. * cli/cli-cmds.c (print_disassembly): Adjust. * cli/cli-decode.c (print_doc_line): Adjust. * cli/cli-interp.c (safe_execute_command): Adjust. * cli/cli-logging.c (set_logging_redirect, pop_output_files) (handle_redirections): Adjust. * cli/cli-script.c (show_user_1): Adjust. * cli/cli-setshow.c (do_setshow_command, cmd_show_list): Adjust. * mi/mi-cmd-break.c (breakpoint_notify): Adjust. * mi/mi-cmd-disas.c (mi_cmd_disassemble): Adjust. * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_path) (mi_cmd_env_dir): Adjust. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file) (print_partial_file_name, mi_cmd_file_list_exec_source_files): Adjust. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames) (mi_cmd_stack_info_depth, mi_cmd_stack_list_args) (list_args_or_locals): Adjust. * mi/mi-cmd-var.c (print_varobj, mi_cmd_var_create) (mi_cmd_var_delete, mi_cmd_var_set_format, mi_cmd_var_set_frozen) (mi_cmd_var_show_format, mi_cmd_var_info_num_children) (mi_cmd_var_list_children, mi_cmd_var_info_type) (mi_cmd_var_info_path_expression, mi_cmd_var_info_expression) (mi_cmd_var_show_attributes, mi_cmd_var_evaluate_expression) (mi_cmd_var_assign, mi_cmd_var_update, varobj_update_one): Adjust. * mi/mi-interp.c (mi_on_normal_stop): Adjust. * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_thread_select) (mi_cmd_thread_list_ids, mi_cmd_thread_info, print_one_inferior) (list_available_thread_groups, mi_cmd_list_thread_groups) (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers) (mi_cmd_data_list_register_values, get_register) (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory) (mi_cmd_data_read_memory_bytes, mi_cmd_list_features) (mi_cmd_list_target_features, mi_cmd_add_inferior) (mi_execute_command, mi_load_progress): Adjust. * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Adjust. * python/py-auto-load.c (print_script, info_auto_load_scripts): Adjust. * python/py-breakpoint.c (bppy_get_commands): Adjust. * tui/tui-interp.c (tui_command_loop): Adjust. * tui/tui-io.c (tui_setup_io, tui_initialize_io): Adjust.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c2
-rw-r--r--gdb/cli/cli-decode.c2
-rw-r--r--gdb/cli/cli-interp.c6
-rw-r--r--gdb/cli/cli-logging.c5
-rw-r--r--gdb/cli/cli-script.c2
-rw-r--r--gdb/cli/cli-setshow.c3
6 files changed, 12 insertions, 8 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index d4b29a21..ccf6ea6 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1063,7 +1063,7 @@ print_disassembly (struct gdbarch *gdbarch, const char *name,
paddress (gdbarch, low), paddress (gdbarch, high));
/* Dump the specified range. */
- gdb_disassembly (gdbarch, uiout, 0, flags, -1, low, high);
+ gdb_disassembly (gdbarch, current_uiout, 0, flags, -1, low, high);
printf_filtered ("End of assembler dump.\n");
gdb_flush (gdb_stdout);
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 744d52e..622ee68 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -1018,7 +1018,7 @@ print_doc_line (struct ui_file *stream, char *str)
line_buffer[p - str] = '\0';
if (islower (line_buffer[0]))
line_buffer[0] = toupper (line_buffer[0]);
- ui_out_text (uiout, line_buffer);
+ ui_out_text (current_uiout, line_buffer);
}
/* Print one-line help for command C.
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 32883cf..3284849 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -118,8 +118,8 @@ safe_execute_command (struct ui_out *command_uiout, char *command, int from_tty)
struct ui_out *saved_uiout;
/* Save and override the global ``struct ui_out'' builder. */
- saved_uiout = uiout;
- uiout = command_uiout;
+ saved_uiout = current_uiout;
+ current_uiout = command_uiout;
TRY_CATCH (e, RETURN_MASK_ALL)
{
@@ -127,7 +127,7 @@ safe_execute_command (struct ui_out *command_uiout, char *command, int from_tty)
}
/* Restore the global builder. */
- uiout = saved_uiout;
+ current_uiout = saved_uiout;
/* FIXME: cagney/2005-01-13: This shouldn't be needed. Instead the
caller should print the exception. */
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index d0e25ea..46f89c0 100644
--- a/gdb/cli/cli-logging.c
+++ b/gdb/cli/cli-logging.c
@@ -81,6 +81,7 @@ set_logging_redirect (char *args, int from_tty, struct cmd_list_element *c)
{
struct cleanup *cleanups = NULL;
struct ui_file *output, *new_logging_no_redirect_file;
+ struct ui_out *uiout = current_uiout;
if (saved_filename == NULL
|| (logging_redirect != 0 && logging_no_redirect_file == NULL)
@@ -166,7 +167,7 @@ pop_output_files (void)
saved_output.targ = NULL;
saved_output.targerr = NULL;
- ui_out_redirect (uiout, NULL);
+ ui_out_redirect (current_uiout, NULL);
}
/* This is a helper for the `set logging' command. */
@@ -226,7 +227,7 @@ handle_redirections (int from_tty)
gdb_stdtarg = output;
gdb_stdtargerr = output;
- if (ui_out_redirect (uiout, output) < 0)
+ if (ui_out_redirect (current_uiout, output) < 0)
warning (_("Current output protocol does not support redirection"));
}
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index c94f7ee..66fa220 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1661,7 +1661,7 @@ show_user_1 (struct cmd_list_element *c, char *prefix, char *name,
return;
fprintf_filtered (stream, "User command \"%s%s\":\n", prefix, name);
- print_command_lines (uiout, cmdlines, 1);
+ print_command_lines (current_uiout, cmdlines, 1);
fputs_filtered ("\n", stream);
}
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 8dbfaad..5e48466 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -125,6 +125,8 @@ deprecated_show_value_hack (struct ui_file *ignore_file,
void
do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
{
+ struct ui_out *uiout = current_uiout;
+
if (c->type == set_cmd)
{
switch (c->var_type)
@@ -411,6 +413,7 @@ void
cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
{
struct cleanup *showlist_chain;
+ struct ui_out *uiout = current_uiout;
showlist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "showlist");
for (; list != NULL; list = list->next)