From: Tom Tromey Date: Wed, 18 Dec 2013 04:41:52 +0000 (-0700) Subject: Add target_ops argument to to_trace_find X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd4c67938f9885f36df3d5d9635aba4e8870b95d;p=binutils-gdb.git Add target_ops argument to to_trace_find 2014-02-19 Tom Tromey * tracepoint.c (tfile_trace_find): Add 'self' argument. * target.h (struct target_ops) : Add argument. (target_trace_find): Add argument. * target.c (update_current_target): Update. * remote.c (remote_trace_find): Add 'self' argument. * ctf.c (ctf_trace_find): Add 'self' argument. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd76ca69032..67e84941e10 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2014-02-19 Tom Tromey + + * tracepoint.c (tfile_trace_find): Add 'self' argument. + * target.h (struct target_ops) : Add argument. + (target_trace_find): Add argument. + * target.c (update_current_target): Update. + * remote.c (remote_trace_find): Add 'self' argument. + * ctf.c (ctf_trace_find): Add 'self' argument. + 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. diff --git a/gdb/ctf.c b/gdb/ctf.c index b31c987efb2..b2b0e865ec4 100644 --- a/gdb/ctf.c +++ b/gdb/ctf.c @@ -1633,7 +1633,7 @@ ctf_get_traceframe_address (void) number in it. Return traceframe number when matched. */ static int -ctf_trace_find (enum trace_find_type type, int num, +ctf_trace_find (struct target_ops *self, enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp) { int ret = -1; diff --git a/gdb/remote.c b/gdb/remote.c index 74f0b77dcb5..509e8b37238 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -10831,7 +10831,8 @@ remote_trace_stop (struct target_ops *self) } static int -remote_trace_find (enum trace_find_type type, int num, +remote_trace_find (struct target_ops *self, + enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp) { diff --git a/gdb/target.c b/gdb/target.c index 6eaa70b92d9..56036f9376e 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -883,7 +883,8 @@ update_current_target (void) (void (*) (struct target_ops *)) tcomplain); de_fault (to_trace_find, - (int (*) (enum trace_find_type, int, CORE_ADDR, CORE_ADDR, int *)) + (int (*) (struct target_ops *, + enum trace_find_type, int, CORE_ADDR, CORE_ADDR, int *)) return_minus_one); de_fault (to_get_trace_state_variable_value, (int (*) (int, LONGEST *)) diff --git a/gdb/target.h b/gdb/target.h index 33377eb7731..0754050998c 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -801,7 +801,8 @@ struct target_ops number of the trace frame, and also the tracepoint number at TPP. If no trace frame matches, return -1. May throw if the operation fails. */ - int (*to_trace_find) (enum trace_find_type type, int num, + int (*to_trace_find) (struct target_ops *, + enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp); /* Get the value of the trace state variable number TSV, returning @@ -1819,7 +1820,8 @@ extern char *target_fileio_read_stralloc (const char *filename); (*current_target.to_trace_stop) (¤t_target) #define target_trace_find(type,num,addr1,addr2,tpp) \ - (*current_target.to_trace_find) ((type), (num), (addr1), (addr2), (tpp)) + (*current_target.to_trace_find) (¤t_target, \ + (type), (num), (addr1), (addr2), (tpp)) #define target_get_trace_state_variable_value(tsv,val) \ (*current_target.to_get_trace_state_variable_value) ((tsv), (val)) diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 6698dd6e131..5d034b5767c 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -4839,7 +4839,7 @@ tfile_get_traceframe_address (off_t tframe_offset) each. */ static int -tfile_trace_find (enum trace_find_type type, int num, +tfile_trace_find (struct target_ops *self, enum trace_find_type type, int num, CORE_ADDR addr1, CORE_ADDR addr2, int *tpp) { short tpnum;