+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target-delegates.c: Rebuild.
+ * target.c (update_current_target): Don't inherit or default
+ to_execution_direction.
+ * target.h (struct target_ops) <to_execution_direction>: Use
+ TARGET_DEFAULT_FUNC.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
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)
{
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;
}
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;
}
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);
/* 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);
de_fault (to_augmented_libraries_svr4_read,
(int (*) (struct target_ops *))
return_zero);
- de_fault (to_execution_direction, default_execution_direction);
#undef de_fault
/* 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? */