Add target_ops argument to to_post_attach
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:28:08 +0000 (21:28 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:29 +0000 (07:45 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_post_attach>: Add argument.
(target_post_attach): Add argument.
* target.c (debug_to_post_attach): Add argument.
(update_current_target): Update.
* spu-linux-nat.c (spu_child_post_attach): Add 'self' argument.
* nto-procfs.c (procfs_post_attach): Add 'self' argument.
* linux-nat.c (linux_child_post_attach): Add 'self' argument.
* inf-ptrace.c (inf_ptrace_post_attach): Add 'self' argument.
* inf-child.c (inf_child_post_attach): Add 'self' argument.

gdb/ChangeLog
gdb/inf-child.c
gdb/inf-ptrace.c
gdb/linux-nat.c
gdb/nto-procfs.c
gdb/spu-linux-nat.c
gdb/target.c
gdb/target.h

index a98901b10ead64c25adaf78e774f435b94aaab63..96d6e5801831245468de66fb48c8baf2ae5af94c 100644 (file)
@@ -1,3 +1,15 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_post_attach>: Add argument.
+       (target_post_attach): Add argument.
+       * target.c (debug_to_post_attach): Add argument.
+       (update_current_target): Update.
+       * spu-linux-nat.c (spu_child_post_attach): Add 'self' argument.
+       * nto-procfs.c (procfs_post_attach): Add 'self' argument.
+       * linux-nat.c (linux_child_post_attach): Add 'self' argument.
+       * inf-ptrace.c (inf_ptrace_post_attach): Add 'self' argument.
+       * inf-child.c (inf_child_post_attach): Add 'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * windows-nat.c (windows_close): Add 'self' argument.
index 549e44aa5ccbde53ff9d0e98aed70c7673e3d85a..c142912650262fa6a34fce87cbfbc759a22b48d9 100644 (file)
@@ -87,7 +87,7 @@ inf_child_store_inferior_registers (struct target_ops *ops,
 }
 
 static void
-inf_child_post_attach (int pid)
+inf_child_post_attach (struct target_ops *self, int pid)
 {
   /* This version of Unix doesn't require a meaningful "post attach"
      operation by a debugger.  */
index 1269d24b657430af712c77eddacf8ee51bb98e5b..ac4d2a44cc8f389b12c0b6de2bc8551243a954a9 100644 (file)
@@ -246,7 +246,7 @@ inf_ptrace_attach (struct target_ops *ops, char *args, int from_tty)
 #ifdef PT_GET_PROCESS_STATE
 
 static void
-inf_ptrace_post_attach (int pid)
+inf_ptrace_post_attach (struct target_ops *self, int pid)
 {
   ptrace_event_t pe;
 
index a76ba30438954c4bc92cf237434f35501b5972b5..a6118affb99b7398617d789ffafc6f17f30297d8 100644 (file)
@@ -329,7 +329,7 @@ linux_init_ptrace (pid_t pid)
 }
 
 static void
-linux_child_post_attach (int pid)
+linux_child_post_attach (struct target_ops *self, int pid)
 {
   linux_init_ptrace (pid);
 }
index 7739197c185410a4dbd7318c4bd331db85d97002..9fab8618641abb5175acfb299557c87c61f34b28 100644 (file)
@@ -648,7 +648,7 @@ procfs_attach (struct target_ops *ops, char *args, int from_tty)
 }
 
 static void
-procfs_post_attach (pid_t pid)
+procfs_post_attach (struct target_ops *self, pid_t pid)
 {
   if (exec_bfd)
     solib_create_inferior_hook (0);
index a68e4e0531d4cbb0651f2a1ca392b55eb31bb9d3..71c1643c550b771e094d357eb5e2159a2e2df5b6 100644 (file)
@@ -420,7 +420,7 @@ spu_child_post_startup_inferior (ptid_t ptid)
 /* Override the post_attach routine to try load the SPE executable
    file image from its copy inside the target process.  */
 static void
-spu_child_post_attach (int pid)
+spu_child_post_attach (struct target_ops *self, int pid)
 {
   int fd;
   ULONGEST addr;
index e63725af6702424ff9ae87861de9460d3be6c178..73531e1e89aa8499683280a0c60857589f8ae78f 100644 (file)
@@ -721,7 +721,7 @@ update_current_target (void)
            (void (*) (struct target_ops *))
            target_ignore);
   de_fault (to_post_attach,
-           (void (*) (int))
+           (void (*) (struct target_ops *, int))
            target_ignore);
   de_fault (to_prepare_to_store,
            (void (*) (struct target_ops *, struct regcache *))
@@ -3914,9 +3914,9 @@ target_stop (ptid_t ptid)
 }
 
 static void
-debug_to_post_attach (int pid)
+debug_to_post_attach (struct target_ops *self, int pid)
 {
-  debug_target.to_post_attach (pid);
+  debug_target.to_post_attach (&debug_target, pid);
 
   fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid);
 }
index 125d649a88b7ee6704afff870ca2d07e0a194870..1e8d6122d034389ae12f65a6a7831be8904f1fd5 100644 (file)
@@ -404,7 +404,7 @@ struct target_ops
     void (*to_xclose) (struct target_ops *targ);
     void (*to_close) (struct target_ops *);
     void (*to_attach) (struct target_ops *ops, char *, int);
-    void (*to_post_attach) (int);
+    void (*to_post_attach) (struct target_ops *, int);
     void (*to_detach) (struct target_ops *ops, const char *, int);
     void (*to_disconnect) (struct target_ops *, char *, int);
     void (*to_resume) (struct target_ops *, ptid_t, int, enum gdb_signal)
@@ -1019,7 +1019,7 @@ void target_attach (char *, int);
    This operation provides a target-specific hook that allows the
    necessary bookkeeping to be performed after an attach completes.  */
 #define target_post_attach(pid) \
-     (*current_target.to_post_attach) (pid)
+     (*current_target.to_post_attach) (&current_target, pid)
 
 /* Takes a program previously attached to and detaches it.
    The program may resume execution (some targets do, some don't) and will
This page took 0.03439 seconds and 4 git commands to generate.