diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/target-delegates.c | 16 | ||||
-rw-r--r-- | gdb/target.c | 5 | ||||
-rw-r--r-- | gdb/target.h | 3 |
4 files changed, 27 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7275f1b..056e56b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -2,6 +2,14 @@ * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default + to_upload_trace_state_variables. + * target.h (struct target_ops) <to_upload_trace_state_variables>: + Use TARGET_DEFAULT_RETURN. + +2014-02-19 Tom Tromey <tromey@redhat.com> + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't inherit or default to_upload_tracepoints. * target.h (struct target_ops) <to_upload_tracepoints>: Use TARGET_DEFAULT_RETURN. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 87feef0..4d5ca99 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -833,6 +833,19 @@ tdefault_upload_tracepoints (struct target_ops *self, struct uploaded_tp **arg1) } static int +delegate_upload_trace_state_variables (struct target_ops *self, struct uploaded_tsv **arg1) +{ + self = self->beneath; + return self->to_upload_trace_state_variables (self, arg1); +} + +static int +tdefault_upload_trace_state_variables (struct target_ops *self, struct uploaded_tsv **arg1) +{ + return 0; +} + +static int delegate_supports_btrace (struct target_ops *self) { self = self->beneath; @@ -990,6 +1003,8 @@ install_delegators (struct target_ops *ops) ops->to_save_trace_data = delegate_save_trace_data; if (ops->to_upload_tracepoints == NULL) ops->to_upload_tracepoints = delegate_upload_tracepoints; + if (ops->to_upload_trace_state_variables == NULL) + ops->to_upload_trace_state_variables = delegate_upload_trace_state_variables; if (ops->to_supports_btrace == NULL) ops->to_supports_btrace = delegate_supports_btrace; } @@ -1068,5 +1083,6 @@ install_dummy_methods (struct target_ops *ops) ops->to_get_trace_state_variable_value = tdefault_get_trace_state_variable_value; ops->to_save_trace_data = tdefault_save_trace_data; ops->to_upload_tracepoints = tdefault_upload_tracepoints; + ops->to_upload_trace_state_variables = tdefault_upload_trace_state_variables; ops->to_supports_btrace = tdefault_supports_btrace; } diff --git a/gdb/target.c b/gdb/target.c index e406142..38d8dda 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -703,7 +703,7 @@ update_current_target (void) /* Do not inherit to_get_trace_state_variable_value. */ /* Do not inherit to_save_trace_data. */ /* Do not inherit to_upload_tracepoints. */ - INHERIT (to_upload_trace_state_variables, t); + /* Do not inherit to_upload_trace_state_variables. */ INHERIT (to_get_raw_trace_data, t); INHERIT (to_get_min_fast_tracepoint_insn_len, t); INHERIT (to_set_disconnected_tracing, t); @@ -752,9 +752,6 @@ update_current_target (void) (void (*) (struct target_ops *, ptid_t)) target_ignore); current_target.to_read_description = NULL; - de_fault (to_upload_trace_state_variables, - (int (*) (struct target_ops *, struct uploaded_tsv **)) - return_zero); de_fault (to_get_raw_trace_data, (LONGEST (*) (struct target_ops *, gdb_byte *, ULONGEST, LONGEST)) tcomplain); diff --git a/gdb/target.h b/gdb/target.h index f1e08a4..11e716c 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -877,7 +877,8 @@ struct target_ops TARGET_DEFAULT_RETURN (0); int (*to_upload_trace_state_variables) (struct target_ops *, - struct uploaded_tsv **utsvp); + struct uploaded_tsv **utsvp) + TARGET_DEFAULT_RETURN (0); LONGEST (*to_get_raw_trace_data) (struct target_ops *, gdb_byte *buf, ULONGEST offset, LONGEST len); |