diff options
-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 9c294de..a8c76c8 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_trace_stop. + * target.h (struct target_ops) <to_trace_stop>: Use + TARGET_DEFAULT_NORETURN. + +2014-02-19 Tom Tromey <tromey@redhat.com> + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't inherit or default to_get_tracepoint_status. * target.h (struct target_ops) <to_get_tracepoint_status>: Use TARGET_DEFAULT_NORETURN. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 898ee44..62fda4c 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -767,6 +767,19 @@ tdefault_get_tracepoint_status (struct target_ops *self, struct breakpoint *arg1 tcomplain (); } +static void +delegate_trace_stop (struct target_ops *self) +{ + self = self->beneath; + self->to_trace_stop (self); +} + +static void +tdefault_trace_stop (struct target_ops *self) +{ + tcomplain (); +} + static int delegate_supports_btrace (struct target_ops *self) { @@ -915,6 +928,8 @@ install_delegators (struct target_ops *ops) ops->to_get_trace_status = delegate_get_trace_status; if (ops->to_get_tracepoint_status == NULL) ops->to_get_tracepoint_status = delegate_get_tracepoint_status; + if (ops->to_trace_stop == NULL) + ops->to_trace_stop = delegate_trace_stop; if (ops->to_supports_btrace == NULL) ops->to_supports_btrace = delegate_supports_btrace; } @@ -988,5 +1003,6 @@ install_dummy_methods (struct target_ops *ops) ops->to_trace_start = tdefault_trace_start; ops->to_get_trace_status = tdefault_get_trace_status; ops->to_get_tracepoint_status = tdefault_get_tracepoint_status; + ops->to_trace_stop = tdefault_trace_stop; ops->to_supports_btrace = tdefault_supports_btrace; } diff --git a/gdb/target.c b/gdb/target.c index 6da6cf8..02981e2 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -698,7 +698,7 @@ update_current_target (void) /* Do not inherit to_trace_start. */ /* Do not inherit to_get_trace_status. */ /* Do not inherit to_get_tracepoint_status. */ - INHERIT (to_trace_stop, t); + /* Do not inherit to_trace_stop. */ INHERIT (to_trace_find, t); INHERIT (to_get_trace_state_variable_value, t); INHERIT (to_save_trace_data, 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_trace_stop, - (void (*) (struct target_ops *)) - tcomplain); de_fault (to_trace_find, (int (*) (struct target_ops *, enum trace_find_type, int, CORE_ADDR, CORE_ADDR, int *)) diff --git a/gdb/target.h b/gdb/target.h index 2caa891..ad644a5 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -849,7 +849,8 @@ struct target_ops TARGET_DEFAULT_NORETURN (tcomplain ()); /* Stop a trace run. */ - void (*to_trace_stop) (struct target_ops *); + void (*to_trace_stop) (struct target_ops *) + TARGET_DEFAULT_NORETURN (tcomplain ()); /* Ask the target to find a trace frame of the given type TYPE, using NUM, ADDR1, and ADDR2 as search parameters. Returns the |