summaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
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 d4b29a213d4..ccf6ea6ebb0 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 744d52e1872..622ee686784 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 32883cfbe53..32848495f08 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 d0e25ea5550..46f89c0333b 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 c94f7eedaac..66fa220b310 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 8dbfaadde62..5e4846630b4 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)