From e51c07ea4ab456d2a46fb48256007518722d21e9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Dec 2013 14:07:28 -0700 Subject: [PATCH] convert to_trace_stop 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_trace_stop. * target.h (struct target_ops) : Use TARGET_DEFAULT_NORETURN. --- gdb/ChangeLog | 8 ++++++++ gdb/target-delegates.c | 16 ++++++++++++++++ gdb/target.c | 5 +---- gdb/target.h | 3 ++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9c294de0c23..a8c76c88ea5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2014-02-19 Tom Tromey + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't inherit or default + to_trace_stop. + * target.h (struct target_ops) : Use + TARGET_DEFAULT_NORETURN. + 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 898ee446dab..62fda4c7a13 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 6da6cf823b9..02981e2b0e6 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 2caa891e399..ad644a5ddf6 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 -- 2.30.2