convert to_post_attach
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 16:42:24 +0000 (09:42 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:47:02 +0000 (07:47 -0700)
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.

gdb/ChangeLog
gdb/target-delegates.c
gdb/target.c
gdb/target.h

index 0ccd337ba92abdfca5b8f75f221af7fab613d9b5..a197e9b290d42dfd61d904bb08e4258c08aa16c1 100644 (file)
@@ -1,3 +1,11 @@
+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.
index b2547c0af6b0c0e7ac02f9e3ee4ab07b1676d4a1..0c30afaca3008b615adbe8c86e63c54607b7e568 100644 (file)
@@ -10,6 +10,18 @@ delegate_attach (struct target_ops *self, char *arg1, int arg2)
   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)
 {
@@ -166,6 +178,8 @@ install_delegators (struct target_ops *ops)
 {
   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)
@@ -200,6 +214,7 @@ static void
 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;
index 3782e7c88bf00adb762346f35941c2695aed36d2..ef961e3eb146a5745d73c58aa01ee09cd5a5f65c 100644 (file)
@@ -591,7 +591,7 @@ update_current_target (void)
       /* 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.  */
@@ -730,9 +730,6 @@ update_current_target (void)
   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);
index bd33b4c6bd4ced8837fd2131803e64e34b9e0505..c35b9e337fc09ad4fef893309eaecb4e6e1d335a 100644 (file)
@@ -405,7 +405,8 @@ struct target_ops
     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);
This page took 0.037839 seconds and 4 git commands to generate.