if (current_token)
fputs_unfiltered (current_token, raw_stdout);
fputs_unfiltered ("^exit\n", raw_stdout);
- mi_out_put (uiout, raw_stdout);
+ mi_out_put (current_uiout, raw_stdout);
gdb_flush (raw_stdout);
/* FIXME: The function called is not yet a formal libgdb function. */
quit_force (NULL, FROM_TTY);
if (argc != 1)
error (_("-thread-select: USAGE: threadnum."));
- rc = gdb_thread_select (uiout, argv[0], &mi_error_message);
+ rc = gdb_thread_select (current_uiout, argv[0], &mi_error_message);
if (rc == GDB_RC_FAIL)
{
if (argc != 0)
error (_("-thread-list-ids: No arguments required."));
- rc = gdb_list_thread_ids (uiout, &mi_error_message);
+ rc = gdb_list_thread_ids (current_uiout, &mi_error_message);
if (rc == GDB_RC_FAIL)
{
if (argc != 0 && argc != 1)
error (_("Invalid MI command"));
- print_thread_info (uiout, argv[0], -1);
+ print_thread_info (current_uiout, argv[0], -1);
}
struct collect_cores_data
print_one_inferior (struct inferior *inferior, void *xdata)
{
struct print_one_inferior_data *top_data = xdata;
+ struct ui_out *uiout = current_uiout;
if (VEC_empty (int, top_data->inferiors)
|| bsearch (&(inferior->pid), VEC_address (int, top_data->inferiors),
struct osdata *data;
struct osdata_item *item;
int ix_items;
+ struct ui_out *uiout = current_uiout;
/* This keeps a map from integer (pid) to VEC (struct osdata_item *)*
The vector contains information about all threads for the given pid.
void
mi_cmd_list_thread_groups (char *command, char **argv, int argc)
{
+ struct ui_out *uiout = current_uiout;
struct cleanup *back_to;
int available = 0;
int recurse = 0;
mi_cmd_data_list_register_names (char *command, char **argv, int argc)
{
struct gdbarch *gdbarch;
+ struct ui_out *uiout = current_uiout;
int regnum, numregs;
int i;
struct cleanup *cleanup;
mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
{
static struct regcache *this_regs = NULL;
+ struct ui_out *uiout = current_uiout;
struct regcache *prev_regs;
struct gdbarch *gdbarch;
int regnum, numregs, changed;
void
mi_cmd_data_list_register_values (char *command, char **argv, int argc)
{
+ struct ui_out *uiout = current_uiout;
struct frame_info *frame;
struct gdbarch *gdbarch;
int regnum, numregs, format;
get_register (struct frame_info *frame, int regnum, int format)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
+ struct ui_out *uiout = current_uiout;
CORE_ADDR addr;
enum lval_type lval;
static struct ui_stream *stb = NULL;
struct value *val;
struct ui_stream *stb = NULL;
struct value_print_options opts;
+ struct ui_out *uiout = current_uiout;
stb = ui_out_stream_new (uiout);
mi_cmd_data_read_memory (char *command, char **argv, int argc)
{
struct gdbarch *gdbarch = get_current_arch ();
+ struct ui_out *uiout = current_uiout;
struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
CORE_ADDR addr;
long total_bytes;
mi_cmd_data_read_memory_bytes (char *command, char **argv, int argc)
{
struct gdbarch *gdbarch = get_current_arch ();
+ struct ui_out *uiout = current_uiout;
struct cleanup *cleanups;
CORE_ADDR addr;
LONGEST length;
if (argc == 0)
{
struct cleanup *cleanup = NULL;
+ struct ui_out *uiout = current_uiout;
cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features");
ui_out_field_string (uiout, NULL, "frozen-varobjs");
if (argc == 0)
{
struct cleanup *cleanup = NULL;
+ struct ui_out *uiout = current_uiout;
cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features");
if (target_can_async_p ())
inf = add_inferior_with_spaces ();
- ui_out_field_fmt (uiout, "inferior", "i%d", inf->num);
+ ui_out_field_fmt (current_uiout, "inferior", "i%d", inf->num);
}
/* Callback used to find the first inferior other than the
TRY_CATCH (result, RETURN_MASK_ALL)
{
- captured_mi_execute_command (uiout, command);
+ captured_mi_execute_command (current_uiout, command);
}
if (result.reason < 0)
{
/* The command execution failed and error() was called
somewhere. */
mi_print_exception (command->token, result);
- mi_out_rewind (uiout);
+ mi_out_rewind (current_uiout);
}
bpstat_do_actions ();
static char *previous_sect_name = NULL;
int new_section;
struct ui_out *saved_uiout;
+ struct ui_out *uiout;
/* This function is called through deprecated_show_load_progress
which means uiout may not be correct. Fix it for the duration
of this function. */
- saved_uiout = uiout;
+ saved_uiout = current_uiout;
if (current_interp_named_p (INTERP_MI)
|| current_interp_named_p (INTERP_MI2))
- uiout = mi_out_new (2);
+ current_uiout = mi_out_new (2);
else if (current_interp_named_p (INTERP_MI1))
- uiout = mi_out_new (1);
+ current_uiout = mi_out_new (1);
else if (current_interp_named_p (INTERP_MI3))
- uiout = mi_out_new (3);
+ current_uiout = mi_out_new (3);
else
return;
+ uiout = current_uiout;
+
update_threshold.tv_sec = 0;
update_threshold.tv_usec = 500000;
gettimeofday (&time_now, NULL);