+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * tracepoint.c (tfile_get_trace_status): Add 'self' argument.
+ * target.h (struct target_ops) <to_get_trace_status>: Add
+ argument.
+ (target_get_trace_status): Add argument.
+ * target.c (update_current_target): Update.
+ * remote.c (remote_get_trace_status): Add 'self' argument.
+ (remote_start_remote, remote_can_download_tracepoint): Update.
+ * ctf.c (ctf_get_trace_status): Add 'self' argument.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_trace_start>: Add argument.
The trace status for a file is that tracing can never be run. */
static int
-ctf_get_trace_status (struct trace_status *ts)
+ctf_get_trace_status (struct target_ops *self, struct trace_status *ts)
{
/* Other bits of trace status were collected as part of opening the
trace files, so nothing to do here. */
static void remote_set_permissions (void);
struct remote_state;
-static int remote_get_trace_status (struct trace_status *ts);
+static int remote_get_trace_status (struct target_ops *self,
+ struct trace_status *ts);
static int remote_upload_tracepoints (struct uploaded_tp **utpp);
/* Upload TSVs regardless of whether the target is running or not. The
remote stub, such as GDBserver, may have some predefined or builtin
TSVs, even if the target is not running. */
- if (remote_get_trace_status (current_trace_status ()) != -1)
+ if (remote_get_trace_status (target, current_trace_status ()) != -1)
{
struct uploaded_tsv *uploaded_tsvs = NULL;
/* Possibly the target has been engaged in a trace run started
previously; find out where things are at. */
- if (remote_get_trace_status (current_trace_status ()) != -1)
+ if (remote_get_trace_status (target, current_trace_status ()) != -1)
{
struct uploaded_tp *uploaded_tps = NULL;
return 0;
ts = current_trace_status ();
- status = remote_get_trace_status (ts);
+ status = remote_get_trace_status (self, ts);
if (status == -1 || !ts->running_known || !ts->running)
return 0;
}
static int
-remote_get_trace_status (struct trace_status *ts)
+remote_get_trace_status (struct target_ops *self, struct trace_status *ts)
{
/* Initialize it just to avoid a GCC false warning. */
char *p = NULL;
(void (*) (struct target_ops *))
tcomplain);
de_fault (to_get_trace_status,
- (int (*) (struct trace_status *))
+ (int (*) (struct target_ops *, struct trace_status *))
return_minus_one);
de_fault (to_get_tracepoint_status,
(void (*) (struct breakpoint *, struct uploaded_tp *))
void (*to_trace_start) (struct target_ops *);
/* Get the current status of a tracing run. */
- int (*to_get_trace_status) (struct trace_status *ts);
+ int (*to_get_trace_status) (struct target_ops *, struct trace_status *ts);
void (*to_get_tracepoint_status) (struct breakpoint *tp,
struct uploaded_tp *utp);
(*current_target.to_trace_set_readonly_regions) (¤t_target)
#define target_get_trace_status(ts) \
- (*current_target.to_get_trace_status) (ts)
+ (*current_target.to_get_trace_status) (¤t_target, ts)
#define target_get_tracepoint_status(tp,utp) \
(*current_target.to_get_tracepoint_status) (tp, utp)
/* The trace status for a file is that tracing can never be run. */
static int
-tfile_get_trace_status (struct trace_status *ts)
+tfile_get_trace_status (struct target_ops *self, struct trace_status *ts)
{
/* Other bits of trace status were collected as part of opening the
trace files, so nothing to do here. */