+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target-delegates.c: Rebuild.
+ * target.c (update_current_target): Don't inherit or default
+ to_post_attach.
+ * target.h (struct target_ops) <to_post_attach>: Use
+ TARGET_DEFAULT_IGNORE.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
self->to_attach (self, arg1, arg2);
}
+static void
+delegate_post_attach (struct target_ops *self, int arg1)
+{
+ self = self->beneath;
+ self->to_post_attach (self, arg1);
+}
+
+static void
+tdefault_post_attach (struct target_ops *self, int arg1)
+{
+}
+
static void
delegate_detach (struct target_ops *self, const char *arg1, int arg2)
{
{
if (ops->to_attach == NULL)
ops->to_attach = delegate_attach;
+ if (ops->to_post_attach == NULL)
+ ops->to_post_attach = delegate_post_attach;
if (ops->to_detach == NULL)
ops->to_detach = delegate_detach;
if (ops->to_resume == NULL)
install_dummy_methods (struct target_ops *ops)
{
ops->to_attach = find_default_attach;
+ ops->to_post_attach = tdefault_post_attach;
ops->to_detach = tdefault_detach;
ops->to_resume = tdefault_resume;
ops->to_wait = tdefault_wait;
/* Do not inherit to_open. */
/* Do not inherit to_close. */
/* Do not inherit to_attach. */
- INHERIT (to_post_attach, t);
+ /* Do not inherit to_post_attach. */
INHERIT (to_attach_no_wait, t);
/* Do not inherit to_detach. */
/* Do not inherit to_disconnect. */
de_fault (to_close,
(void (*) (struct target_ops *))
target_ignore);
- de_fault (to_post_attach,
- (void (*) (struct target_ops *, int))
- target_ignore);
de_fault (to_prepare_to_store,
(void (*) (struct target_ops *, struct regcache *))
noprocess);
void (*to_close) (struct target_ops *);
void (*to_attach) (struct target_ops *ops, char *, int)
TARGET_DEFAULT_FUNC (find_default_attach);
- void (*to_post_attach) (struct target_ops *, int);
+ void (*to_post_attach) (struct target_ops *, int)
+ TARGET_DEFAULT_IGNORE ();
void (*to_detach) (struct target_ops *ops, const char *, int)
TARGET_DEFAULT_IGNORE ();
void (*to_disconnect) (struct target_ops *, char *, int);