aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-03-27 19:08:37 +0000
committerPedro Alves <palves@redhat.com>2012-03-27 19:08:37 +0000
commitf99d8bf46c55bc0192b3765e7738fd644c20619e (patch)
tree2fb350823defa26f0a9bf4c46085288f4862c546 /gdb/cli
parent72508ac0bfe7aae764ddce41ea504e2377fecd1d (diff)
downloadgdb-f99d8bf46c55bc0192b3765e7738fd644c20619e.zip
gdb-f99d8bf46c55bc0192b3765e7738fd644c20619e.tar.gz
gdb-f99d8bf46c55bc0192b3765e7738fd644c20619e.tar.bz2
2012-03-27 Pedro Alves <palves@redhat.com>
Eliminate struct ui_stream. * ui-out.h (struct ui_stream): Delete. (ui_out_field_stream): Adjust prototype. (ui_out_stream_new, ui_out_stream_delete) (make_cleanup_ui_out_stream_delete): Delete declarations. * ui-out.c (ui_out_field_stream): Change prototype to take a ui_file instead of a ui_stream. Adjust. (ui_out_stream_new, ui_out_stream_delete, do_stream_delete) (make_cleanup_ui_out_stream_delete): Delete. * breakpoint.c (print_breakpoint_location) (print_one_detail_ranged_breakpoint, print_it_watchpoint): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * disasm.c (dump_insns): Ditto. (do_mixed_source_and_assembly, do_assembly_only): Adjust prototype. (gdb_disassembly): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * infcmd.c (print_return_value): Ditto. * osdata.c (info_osdata_command): Don't allocate a local ui_stream. * stack.c (print_frame_arg, print_frame_args, print_frame): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * tracepoint.c (print_one_static_tracepoint_marker): Don't allocate a local ui_stream. * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. (list_args_or_locals): Don't allocate a local ui_stream. * mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression) (mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new. * cli/cli-setshow.c (do_setshow_command): Ditto.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-setshow.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 14fef7c..521ac0e 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -314,10 +314,10 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
else if (c->type == show_cmd)
{
struct cleanup *old_chain;
- struct ui_stream *stb;
+ struct ui_file *stb;
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
+ stb = mem_fileopen ();
+ old_chain = make_cleanup_ui_file_delete (stb);
/* Possibly call the pre hook. */
if (c->pre_show_hook)
@@ -327,29 +327,29 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
{
case var_string:
if (*(char **) c->var)
- fputstr_filtered (*(char **) c->var, '"', stb->stream);
+ fputstr_filtered (*(char **) c->var, '"', stb);
break;
case var_string_noescape:
case var_optional_filename:
case var_filename:
case var_enum:
if (*(char **) c->var)
- fputs_filtered (*(char **) c->var, stb->stream);
+ fputs_filtered (*(char **) c->var, stb);
break;
case var_boolean:
- fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
+ fputs_filtered (*(int *) c->var ? "on" : "off", stb);
break;
case var_auto_boolean:
switch (*(enum auto_boolean*) c->var)
{
case AUTO_BOOLEAN_TRUE:
- fputs_filtered ("on", stb->stream);
+ fputs_filtered ("on", stb);
break;
case AUTO_BOOLEAN_FALSE:
- fputs_filtered ("off", stb->stream);
+ fputs_filtered ("off", stb);
break;
case AUTO_BOOLEAN_AUTO:
- fputs_filtered ("auto", stb->stream);
+ fputs_filtered ("auto", stb);
break;
default:
internal_error (__FILE__, __LINE__,
@@ -362,17 +362,17 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
case var_zuinteger:
if (c->var_type == var_uinteger
&& *(unsigned int *) c->var == UINT_MAX)
- fputs_filtered ("unlimited", stb->stream);
+ fputs_filtered ("unlimited", stb);
else
- fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var);
+ fprintf_filtered (stb, "%u", *(unsigned int *) c->var);
break;
case var_integer:
case var_zinteger:
if (c->var_type == var_integer
&& *(int *) c->var == INT_MAX)
- fputs_filtered ("unlimited", stb->stream);
+ fputs_filtered ("unlimited", stb);
else
- fprintf_filtered (stb->stream, "%d", *(int *) c->var);
+ fprintf_filtered (stb, "%d", *(int *) c->var);
break;
default:
@@ -389,7 +389,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
ui_out_field_stream (uiout, "value", stb);
else
{
- char *value = ui_file_xstrdup (stb->stream, NULL);
+ char *value = ui_file_xstrdup (stb, NULL);
make_cleanup (xfree, value);
if (c->show_value_func != NULL)