if (status == -1)
{
- if (ts->from_file)
+ if (ts->filename != NULL)
printf_filtered (_("Using a trace file.\n"));
else
{
status = target_get_trace_status (ts);
- if (status == -1 && !ts->from_file)
+ if (status == -1 && ts->filename == NULL)
{
ui_out_field_string (uiout, "supported", "0");
return;
}
- if (ts->from_file)
+ if (ts->filename != NULL)
ui_out_field_string (uiout, "supported", "file");
else if (!on_stop)
ui_out_field_string (uiout, "supported", "1");
+ if (ts->filename != NULL)
+ ui_out_field_string (uiout, "trace-file", ts->filename);
+
gdb_assert (ts->running_known);
if (ts->running)
{ /* This should only be called with a numeric argument. */
int frameno = -1;
- if (current_trace_status ()->running && !current_trace_status ()->from_file)
+ if (current_trace_status ()->running
+ && current_trace_status ()->filename == NULL)
error (_("May not look at trace frames while trace is running."));
if (args == 0 || *args == 0)
{
CORE_ADDR pc;
- if (current_trace_status ()->running && !current_trace_status ()->from_file)
+ if (current_trace_status ()->running
+ && current_trace_status ()->filename == NULL)
error (_("May not look at trace frames while trace is running."));
if (args == 0 || *args == 0)
int tdp;
struct tracepoint *tp;
- if (current_trace_status ()->running && !current_trace_status ()->from_file)
+ if (current_trace_status ()->running
+ && current_trace_status ()->filename == NULL)
error (_("May not look at trace frames while trace is running."));
if (args == 0 || *args == 0)
struct symtab_and_line sal;
struct cleanup *old_chain;
- if (current_trace_status ()->running && !current_trace_status ()->from_file)
+ if (current_trace_status ()->running
+ && current_trace_status ()->filename == NULL)
error (_("May not look at trace frames while trace is running."));
if (args == 0 || *args == 0)
static CORE_ADDR start, stop;
char *tmp;
- if (current_trace_status ()->running && !current_trace_status ()->from_file)
+ if (current_trace_status ()->running
+ && current_trace_status ()->filename == NULL)
error (_("May not look at trace frames while trace is running."));
if (args == 0 || *args == 0)
CORE_ADDR start, stop;
char *tmp;
- if (current_trace_status ()->running && !current_trace_status ()->from_file)
+ if (current_trace_status ()->running
+ && current_trace_status ()->filename == NULL)
error (_("May not look at trace frames while trace is running."));
if (args == 0 || *args == 0)
trace_regblock_size = 0;
ts = current_trace_status ();
- /* We know we're working with a file. */
- ts->from_file = 1;
+ /* We know we're working with a file. Record its name. */
+ ts->filename = trace_filename;
/* Set defaults in case there is no status line. */
ts->running_known = 0;
ts->stop_reason = trace_stop_reason_unknown;
static void
tfile_files_info (struct target_ops *t)
{
- /* (it would be useful to mention the name of the file). */
- printf_filtered ("Looking at a trace file.\n");
+ printf_filtered ("\t`%s'\n", trace_filename);
}
/* The trace status for a file is that tracing can never be run. */