summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:42:05 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:46:26 -0700
commit4011015ba220e1f55b4e105e9feb7eaf78703681 (patch)
treea5d9ad466519a42c64704e1799a9123b102683e8 /gdb
parentbd4c67938f9885f36df3d5d9635aba4e8870b95d (diff)
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/ctf.c3
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h6
-rw-r--r--gdb/tracepoint.c3
6 files changed, 23 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 67e84941e1..1111eec69b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,17 @@
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.
* target.h (struct target_ops) <to_trace_find>: Add argument.
(target_trace_find): Add argument.
diff --git a/gdb/ctf.c b/gdb/ctf.c
index b2b0e865ec..79575a7899 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -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;
diff --git a/gdb/remote.c b/gdb/remote.c
index 509e8b3723..8d4e29e35e 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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;
diff --git a/gdb/target.c b/gdb/target.c
index 56036f9376..0860a56b99 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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 *))
diff --git a/gdb/target.h b/gdb/target.h
index 0754050998..16caa29f5a 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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)
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 5d034b5767..9021de00f2 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -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;