/* Memory-access and commands for "inferior" process, for GDB.
- Copyright (C) 1986-2016 Free Software Foundation, Inc.
+ Copyright (C) 1986-2017 Free Software Foundation, Inc.
This file is part of GDB.
if (from_tty)
{
- ui_out_field_string (uiout, NULL, "Starting program");
- ui_out_text (uiout, ": ");
+ uiout->field_string (NULL, "Starting program");
+ uiout->text (": ");
if (exec_file)
- ui_out_field_string (uiout, "execfile", exec_file);
- ui_out_spaces (uiout, 1);
+ uiout->field_string ("execfile", exec_file);
+ uiout->spaces (1);
/* We call get_inferior_args() because we might need to compute
the value now. */
- ui_out_field_string (uiout, "infargs", get_inferior_args ());
- ui_out_text (uiout, "\n");
- ui_out_flush (uiout);
+ uiout->field_string ("infargs", get_inferior_args ());
+ uiout->text ("\n");
+ uiout->flush ();
}
/* Done with ARGS. */
if (rv->value != NULL)
{
struct value_print_options opts;
- struct ui_file *stb;
- struct cleanup *old_chain;
/* Print it. */
- 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",
- rv->value_history_index);
- ui_out_text (uiout, " = ");
+ uiout->text ("Value returned is ");
+ uiout->field_fmt ("gdb-result-var", "$%d",
+ rv->value_history_index);
+ uiout->text (" = ");
get_no_prettyformat_print_options (&opts);
- value_print (rv->value, stb, &opts);
- ui_out_field_stream (uiout, "return-value", stb);
- ui_out_text (uiout, "\n");
- do_cleanups (old_chain);
+
+ string_file stb;
+
+ value_print (rv->value, &stb, &opts);
+ uiout->field_stream ("return-value", stb);
+ uiout->text ("\n");
}
else
{
- struct cleanup *oldchain;
- char *type_name;
-
- type_name = type_to_string (rv->type);
- oldchain = make_cleanup (xfree, type_name);
- ui_out_text (uiout, "Value returned has type: ");
- ui_out_field_string (uiout, "return-type", type_name);
- ui_out_text (uiout, ".");
- ui_out_text (uiout, " Cannot determine contents\n");
- do_cleanups (oldchain);
+ std::string type_name = type_to_string (rv->type);
+ uiout->text ("Value returned has type: ");
+ uiout->field_string ("return-type", type_name.c_str ());
+ uiout->text (".");
+ uiout->text (" Cannot determine contents\n");
}
}
opts.deref_ref = 1;
val_print (regtype,
- value_contents_for_printing (val),
value_embedded_offset (val), 0,
file, 0, val, &opts, current_language);
get_formatted_print_options (&opts, 'x');
opts.deref_ref = 1;
val_print (regtype,
- value_contents_for_printing (val),
value_embedded_offset (val), 0,
file, 0, val, &opts, current_language);
/* If not a vector register, print it also according to its
opts.deref_ref = 1;
fprintf_filtered (file, "\t");
val_print (regtype,
- value_contents_for_printing (val),
value_embedded_offset (val), 0,
file, 0, val, &opts, current_language);
}
/* interrupt [-a]
Stop the execution of the target while running in async mode, in
- the backgound. In all-stop, stop the whole process. In non-stop
+ the background. In all-stop, stop the whole process. In non-stop
mode, stop the current thread only by default, or stop all threads
if the `-a' switch is used. */