From: Tom Tromey Date: Wed, 18 Dec 2013 18:15:21 +0000 (-0700) Subject: convert to_execution_direction X-Git-Tag: gdb-7.8-release~1143 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe31bf5b9e1b6fcfc5f083228328a84b6af19ad8;p=platform%2Fupstream%2Fbinutils.git convert to_execution_direction 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_execution_direction. * target.h (struct target_ops) : Use TARGET_DEFAULT_FUNC. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4894019..ae8bfac 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_execution_direction. + * target.h (struct target_ops) : Use + TARGET_DEFAULT_FUNC. + +2014-02-19 Tom Tromey + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't inherit or default to_can_execute_reverse. * target.h (struct target_ops) : Use TARGET_DEFAULT_RETURN. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 573f9b5..75a715f 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -577,6 +577,13 @@ tdefault_can_execute_reverse (struct target_ops *self) return 0; } +static enum exec_direction_kind +delegate_execution_direction (struct target_ops *self) +{ + self = self->beneath; + return self->to_execution_direction (self); +} + static int delegate_supports_btrace (struct target_ops *self) { @@ -693,6 +700,8 @@ install_delegators (struct target_ops *ops) ops->to_xfer_partial = delegate_xfer_partial; if (ops->to_can_execute_reverse == NULL) ops->to_can_execute_reverse = delegate_can_execute_reverse; + if (ops->to_execution_direction == NULL) + ops->to_execution_direction = delegate_execution_direction; if (ops->to_supports_btrace == NULL) ops->to_supports_btrace = delegate_supports_btrace; } @@ -750,5 +759,6 @@ install_dummy_methods (struct target_ops *ops) ops->to_goto_bookmark = tdefault_goto_bookmark; ops->to_xfer_partial = tdefault_xfer_partial; ops->to_can_execute_reverse = tdefault_can_execute_reverse; + ops->to_execution_direction = default_execution_direction; ops->to_supports_btrace = tdefault_supports_btrace; } diff --git a/gdb/target.c b/gdb/target.c index 1f60aa0..7fe28e3 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -89,6 +89,9 @@ static int find_default_can_async_p (struct target_ops *ignore); static int find_default_is_async_p (struct target_ops *ignore); +static enum exec_direction_kind default_execution_direction + (struct target_ops *self); + #include "target-delegates.c" static void init_dummy_target (void); @@ -674,7 +677,7 @@ update_current_target (void) /* Do not inherit to_goto_bookmark. */ /* Do not inherit to_get_thread_local_address. */ /* Do not inherit to_can_execute_reverse. */ - INHERIT (to_execution_direction, t); + /* Do not inherit to_execution_direction. */ INHERIT (to_thread_architecture, t); /* Do not inherit to_read_description. */ INHERIT (to_get_ada_task_ptid, t); @@ -861,7 +864,6 @@ update_current_target (void) de_fault (to_augmented_libraries_svr4_read, (int (*) (struct target_ops *)) return_zero); - de_fault (to_execution_direction, default_execution_direction); #undef de_fault diff --git a/gdb/target.h b/gdb/target.h index 9b0ad98..fa6056e 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -707,7 +707,8 @@ struct target_ops /* The direction the target is currently executing. Must be implemented on targets that support reverse execution and async mode. The default simply returns forward execution. */ - enum exec_direction_kind (*to_execution_direction) (struct target_ops *); + enum exec_direction_kind (*to_execution_direction) (struct target_ops *) + TARGET_DEFAULT_FUNC (default_execution_direction); /* Does this target support debugging multiple processes simultaneously? */