예제 #1
0
static struct ui_out *
mi_ui_out (struct interp *interp)
{
  struct mi_interp *mi = interp_data (interp);

  return mi->mi_uiout;
}
예제 #2
0
static struct cli_interp *
as_cli_interp (struct interp *interp)
{
  if (strcmp (interp_name (interp), INTERP_CONSOLE) == 0)
    return (struct cli_interp *) interp_data (interp);
  return NULL;
}
예제 #3
0
static struct ui_out *
gdbtk_interpreter_ui_out (struct interp *interp)
{
  struct gdbtk_interp_data *data = interp_data (interp);

  return data->uiout;
}
예제 #4
0
static struct mi_interp *
mi_interp_data (void)
{
  struct interp *interp = find_mi_interpreter ();

  if (interp != NULL)
    return interp_data (interp);
  return NULL;
}
예제 #5
0
void sync_data(std::deque<timestamp_t> &ts0,
               std::deque<vec3_t> &vs0,
               std::deque<timestamp_t> &ts1,
               std::deque<vec3_t> &vs1) {
  // Create interpolate timestamps
  auto interp_ts = interp_timestamps(ts0, ts1);

  // Interpolate
  if (ts0.size() > ts1.size()) {
    interp_data(interp_ts, ts1, vs1);
  } else {
    interp_data(interp_ts, ts0, vs0);
  }

  // Chop the front and back so both timestamps and data are sync-ed
  align_front(interp_ts, ts1, vs1);
  align_front(interp_ts, ts0, vs0);
  align_back(interp_ts, ts1, vs1);
  align_back(interp_ts, ts0, vs0);
}
예제 #6
0
static int
mi_set_logging (struct interp *interp, int start_log,
		struct ui_file *out, struct ui_file *logfile)
{
  struct mi_interp *mi = interp_data (interp);

  if (!mi)
    return 0;

  if (start_log)
    {
      /* The tee created already is based on gdb_stdout, which for MI
	 is a console and so we end up in an infinite loop of console
	 writing to ui_file writing to console etc.  So discard the
	 existing tee (it hasn't been used yet, and MI won't ever use
	 it), and create one based on raw_stdout instead.  */
      if (logfile)
	{
	  ui_file_delete (out);
	  out = tee_file_new (raw_stdout, 0, logfile, 0);
	}

      saved_raw_stdout = raw_stdout;
      raw_stdout = out;
    }
  else
    {
      raw_stdout = saved_raw_stdout;
      saved_raw_stdout = NULL;
    }
  
  mi_console_set_raw (mi->out, raw_stdout);
  mi_console_set_raw (mi->err, raw_stdout);
  mi_console_set_raw (mi->log, raw_stdout);
  mi_console_set_raw (mi->targ, raw_stdout);
  mi_console_set_raw (mi->event_channel, raw_stdout);

  return 1;
}