extern int hex2bin (const char *hex, gdb_byte *bin, int count);
extern int bin2hex (const gdb_byte *bin, char *hex, int count);
-extern void stop_tracing ();
-
/* Maximum length of an agent aexpression.
This accounts for the fact that packets are limited to 400 bytes
(which includes everything -- including the checksum), and assumes
};
struct trace_status *
-current_trace_status ()
+current_trace_status (void)
{
return &trace_status;
}
}
}
-/* Free and and clear the traceframe info cache of the current
+/* Free and clear the traceframe info cache of the current
traceframe. */
static void
{
CORE_ADDR trace_pc;
- if (trace_frame == NULL) /* Cease debugging any trace buffers. */
+ /* Save as globals for internal use. */
+ if (trace_frame != NULL
+ && get_frame_pc_if_available (trace_frame, &trace_pc))
+ {
+ traceframe_sal = find_pc_line (trace_pc, 0);
+ traceframe_fun = find_pc_function (trace_pc);
+
+ /* Save linenumber as "$trace_line", a debugger variable visible to
+ users. */
+ set_internalvar_integer (lookup_internalvar ("trace_line"),
+ traceframe_sal.line);
+ }
+ else
{
- traceframe_fun = 0;
- traceframe_sal.pc = traceframe_sal.line = 0;
- traceframe_sal.symtab = NULL;
- clear_internalvar (lookup_internalvar ("trace_func"));
- clear_internalvar (lookup_internalvar ("trace_file"));
+ init_sal (&traceframe_sal);
+ traceframe_fun = NULL;
set_internalvar_integer (lookup_internalvar ("trace_line"), -1);
- return;
}
- /* Save as globals for internal use. */
- trace_pc = get_frame_pc (trace_frame);
- traceframe_sal = find_pc_line (trace_pc, 0);
- traceframe_fun = find_pc_function (trace_pc);
-
- /* Save linenumber as "$trace_line", a debugger variable visible to
- users. */
- set_internalvar_integer (lookup_internalvar ("trace_line"),
- traceframe_sal.line);
-
/* Save func name as "$trace_func", a debugger variable visible to
users. */
if (traceframe_fun == NULL
struct breakpoint *t;
struct command_line *l;
- t = get_tracepoint_by_number (&args, 0, 1);
+ t = get_tracepoint_by_number (&args, NULL, 1);
if (t)
{
char *tmpbuf =
if (memranges->list[a].type == memranges->list[b].type
&& memranges->list[b].start <= memranges->list[a].end)
{
- memranges->list[a].end = memranges->list[b].end;
+ if (memranges->list[b].end > memranges->list[a].end)
+ memranges->list[a].end = memranges->list[b].end;
continue; /* next b, same a */
}
a++; /* next a */
block = block_for_pc (pc);
if (block == NULL)
{
- warning (_("Can't collect args; no symbol table info available.\n"));
+ warning (_("Can't collect args; no symbol table info available."));
return;
}
struct symbol *sym;
struct minimal_symbol *msym;
struct block *block;
- char **canonical, *symname, *save_args = args;
+ char *symname, *save_args = args;
struct dict_iterator iter;
int j, count = 0;
struct gdbarch *gdbarch;
error (_("requires an argument (function, "
"line or *addr) to define a scope"));
- sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
+ sals = decode_line_1 (&args, 1, NULL, 0, NULL);
if (sals.nelts == 0)
return; /* Presumably decode_line_1 has already warned. */
sprintf (buf, "%s_%d", namebase, try_num++);
/* We have an available name, create the variable. */
- tsv = create_trace_state_variable (xstrdup (buf));
+ tsv = create_trace_state_variable (buf);
tsv->initial_value = utsv->initial_value;
tsv->builtin = utsv->builtin;