Add target_ops argument to to_upload_tracepoints

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_upload_tracepoints>: Add
	argument.
	(target_upload_tracepoints): Add argument.
	* target.c (update_current_target): Update.
	* remote.c (remote_upload_tracepoints): Add 'self' argument.
	(remote_start_remote): Update.
This commit is contained in:
Tom Tromey 2013-12-17 21:42:29 -07:00
parent dc3decafdd
commit ab6617cc1b
4 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,12 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_upload_tracepoints>: Add
argument.
(target_upload_tracepoints): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_upload_tracepoints): Add 'self' argument.
(remote_start_remote): Update.
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_save_trace_data>: Add argument.

View File

@ -202,7 +202,8 @@ struct remote_state;
static int remote_get_trace_status (struct target_ops *self,
struct trace_status *ts);
static int remote_upload_tracepoints (struct uploaded_tp **utpp);
static int remote_upload_tracepoints (struct target_ops *self,
struct uploaded_tp **utpp);
static int remote_upload_trace_state_variables (struct uploaded_tsv **utsvp);
@ -3614,7 +3615,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
if (current_trace_status ()->running)
printf_filtered (_("Trace is already running on the target.\n"));
remote_upload_tracepoints (&uploaded_tps);
remote_upload_tracepoints (target, &uploaded_tps);
merge_uploaded_tracepoints (&uploaded_tps);
}
@ -11651,7 +11652,7 @@ remote_new_objfile (struct objfile *objfile)
collection. */
static int
remote_upload_tracepoints (struct uploaded_tp **utpp)
remote_upload_tracepoints (struct target_ops *self, struct uploaded_tp **utpp)
{
struct remote_state *rs = get_remote_state ();
char *p;

View File

@ -893,7 +893,7 @@ update_current_target (void)
(int (*) (struct target_ops *, const char *))
tcomplain);
de_fault (to_upload_tracepoints,
(int (*) (struct uploaded_tp **))
(int (*) (struct target_ops *, struct uploaded_tp **))
return_zero);
de_fault (to_upload_trace_state_variables,
(int (*) (struct uploaded_tsv **))

View File

@ -813,7 +813,8 @@ struct target_ops
int (*to_save_trace_data) (struct target_ops *, const char *filename);
int (*to_upload_tracepoints) (struct uploaded_tp **utpp);
int (*to_upload_tracepoints) (struct target_ops *,
struct uploaded_tp **utpp);
int (*to_upload_trace_state_variables) (struct uploaded_tsv **utsvp);
@ -1832,7 +1833,7 @@ extern char *target_fileio_read_stralloc (const char *filename);
(*current_target.to_save_trace_data) (&current_target, filename)
#define target_upload_tracepoints(utpp) \
(*current_target.to_upload_tracepoints) (utpp)
(*current_target.to_upload_tracepoints) (&current_target, utpp)
#define target_upload_trace_state_variables(utsvp) \
(*current_target.to_upload_trace_state_variables) (utsvp)