From 4011015ba220e1f55b4e105e9feb7eaf78703681 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:42:05 -0700 Subject: [PATCH] Add target_ops argument to to_get_trace_state_variable_value 2014-02-19 Tom Tromey * tracepoint.c (tfile_get_trace_state_variable_value): Add 'self' argument. * target.h (struct target_ops) : 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. --- gdb/ChangeLog | 12 ++++++++++++ gdb/ctf.c | 3 ++- gdb/remote.c | 3 ++- gdb/target.c | 2 +- gdb/target.h | 6 ++++-- gdb/tracepoint.c | 3 ++- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 67e84941e10..1111eec69b6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2014-02-19 Tom Tromey + + * tracepoint.c (tfile_get_trace_state_variable_value): Add 'self' + argument. + * target.h (struct target_ops) + : 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 * tracepoint.c (tfile_trace_find): Add 'self' argument. diff --git a/gdb/ctf.c b/gdb/ctf.c index b2b0e865ec4..79575a78991 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 509e8b37238..8d4e29e35e7 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 56036f9376e..0860a56b990 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 0754050998c..16caa29f5a8 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) (¤t_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 5d034b5767c..9021de00f27 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; -- 2.30.2