forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
10
gdb/infcmd.c
10
gdb/infcmd.c
@@ -1471,23 +1471,23 @@ static void
|
||||
print_return_value (struct type *func_type, struct type *value_type)
|
||||
{
|
||||
struct value *value = get_return_value (func_type, value_type);
|
||||
struct cleanup *old_chain;
|
||||
struct ui_stream *stb;
|
||||
struct ui_out *uiout = current_uiout;
|
||||
|
||||
if (value)
|
||||
{
|
||||
struct value_print_options opts;
|
||||
struct ui_file *stb;
|
||||
struct cleanup *old_chain;
|
||||
|
||||
/* Print it. */
|
||||
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);
|
||||
ui_out_text (uiout, "Value returned is ");
|
||||
ui_out_field_fmt (uiout, "gdb-result-var", "$%d",
|
||||
record_latest_value (value));
|
||||
ui_out_text (uiout, " = ");
|
||||
get_raw_print_options (&opts);
|
||||
value_print (value, stb->stream, &opts);
|
||||
value_print (value, stb, &opts);
|
||||
ui_out_field_stream (uiout, "return-value", stb);
|
||||
ui_out_text (uiout, "\n");
|
||||
do_cleanups (old_chain);
|
||||
|
||||
Reference in New Issue
Block a user