Add target_ops argument to to_get_trace_state_variable_value

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

	* tracepoint.c (tfile_get_trace_state_variable_value): Add 'self'
	argument.
	* target.h (struct target_ops)
	<to_get_trace_state_variable_value>: Add argument.
	(target_get_trace_state_variable_value): Add argument.
	* target.c (update_current_target): Update.
	* remote.c (remote_get_trace_state_variable_value): Add 'self'
	argument.
	* ctf.c (ctf_get_trace_state_variable_value): Add 'self' argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:42:05 -07:00
parent bd4c67938f
commit 4011015ba2
6 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,15 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* tracepoint.c (tfile_get_trace_state_variable_value): Add 'self'
argument.
* target.h (struct target_ops)
<to_get_trace_state_variable_value>: Add argument.
(target_get_trace_state_variable_value): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_get_trace_state_variable_value): Add 'self'
argument.
* ctf.c (ctf_get_trace_state_variable_value): Add 'self' argument.
2014-02-19 Tom Tromey <tromey@redhat.com>
* tracepoint.c (tfile_trace_find): Add 'self' argument.

View File

@ -1516,7 +1516,8 @@ ctf_xfer_partial (struct target_ops *ops, enum target_object object,
true, otherwise return false. */
static int
ctf_get_trace_state_variable_value (int tsvnum, LONGEST *val)
ctf_get_trace_state_variable_value (struct target_ops *self,
int tsvnum, LONGEST *val)
{
struct bt_iter_pos *pos;
int found = 0;

View File

@ -10914,7 +10914,8 @@ remote_trace_find (struct target_ops *self,
}
static int
remote_get_trace_state_variable_value (int tsvnum, LONGEST *val)
remote_get_trace_state_variable_value (struct target_ops *self,
int tsvnum, LONGEST *val)
{
struct remote_state *rs = get_remote_state ();
char *reply;

View File

@ -887,7 +887,7 @@ update_current_target (void)
enum trace_find_type, int, CORE_ADDR, CORE_ADDR, int *))
return_minus_one);
de_fault (to_get_trace_state_variable_value,
(int (*) (int, LONGEST *))
(int (*) (struct target_ops *, int, LONGEST *))
return_zero);
de_fault (to_save_trace_data,
(int (*) (const char *))

View File

@ -808,7 +808,8 @@ struct target_ops
/* Get the value of the trace state variable number TSV, returning
1 if the value is known and writing the value itself into the
location pointed to by VAL, else returning 0. */
int (*to_get_trace_state_variable_value) (int tsv, LONGEST *val);
int (*to_get_trace_state_variable_value) (struct target_ops *,
int tsv, LONGEST *val);
int (*to_save_trace_data) (const char *filename);
@ -1824,7 +1825,8 @@ extern char *target_fileio_read_stralloc (const char *filename);
(type), (num), (addr1), (addr2), (tpp))
#define target_get_trace_state_variable_value(tsv,val) \
(*current_target.to_get_trace_state_variable_value) ((tsv), (val))
(*current_target.to_get_trace_state_variable_value) (&current_target, \
(tsv), (val))
#define target_save_trace_data(filename) \
(*current_target.to_save_trace_data) (filename)

View File

@ -5210,7 +5210,8 @@ tfile_xfer_partial (struct target_ops *ops, enum target_object object,
block with a matching tsv number. */
static int
tfile_get_trace_state_variable_value (int tsvnum, LONGEST *val)
tfile_get_trace_state_variable_value (struct target_ops *self,
int tsvnum, LONGEST *val)
{
int pos;
int found = 0;