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

* target.h (struct target_ops) <to_insert_fork_catchpoint>: Add
argument.
(target_insert_fork_catchpoint): Add argument.
* target.c (debug_to_insert_fork_catchpoint): Add argument.
(update_current_target): Update.
* linux-nat.c (linux_child_insert_fork_catchpoint): Add 'self'
argument.

gdb/ChangeLog
gdb/linux-nat.c
gdb/target.c
gdb/target.h

index 87f2d46bc9a27eaa1bc3f8b9a970b391b16cd1d4..561333c90b51ccb32ecf797fba29c5da5a7874d5 100644 (file)
@@ -1,3 +1,13 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_insert_fork_catchpoint>: Add
+       argument.
+       (target_insert_fork_catchpoint): Add argument.
+       * target.c (debug_to_insert_fork_catchpoint): Add argument.
+       (update_current_target): Update.
+       * linux-nat.c (linux_child_insert_fork_catchpoint): Add 'self'
+       argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_post_startup_inferior>: Add
index 07289397f40dac638904cb1b495af708eda2bd31..95b003f989caa59186c67271883d33da98603fbd 100644 (file)
@@ -696,7 +696,7 @@ holding the child stopped.  Try \"set detach-on-fork\" or \
 
 \f
 static int
-linux_child_insert_fork_catchpoint (int pid)
+linux_child_insert_fork_catchpoint (struct target_ops *self, int pid)
 {
   return !linux_supports_tracefork ();
 }
index 699b55e9d4b84d631f202abbb8064df0eb8bf628..a0c7214b7d4045aaa836a6d5c76ba521d3b73ec6 100644 (file)
@@ -792,7 +792,7 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   de_fault (to_insert_fork_catchpoint,
-           (int (*) (int))
+           (int (*) (struct target_ops *, int))
            return_one);
   de_fault (to_remove_fork_catchpoint,
            (int (*) (int))
@@ -4866,11 +4866,11 @@ debug_to_post_startup_inferior (struct target_ops *self, ptid_t ptid)
 }
 
 static int
-debug_to_insert_fork_catchpoint (int pid)
+debug_to_insert_fork_catchpoint (struct target_ops *self, int pid)
 {
   int retval;
 
-  retval = debug_target.to_insert_fork_catchpoint (pid);
+  retval = debug_target.to_insert_fork_catchpoint (&debug_target, pid);
 
   fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
                      pid, retval);
index 433925e7d54c71ab0d7cb7833e85309ae5c00796..add3b0ceeea3a2c0ad0ac29c73dbeef655ea53dc 100644 (file)
@@ -498,7 +498,7 @@ struct target_ops
     void (*to_create_inferior) (struct target_ops *, 
                                char *, char *, char **, int);
     void (*to_post_startup_inferior) (struct target_ops *, ptid_t);
-    int (*to_insert_fork_catchpoint) (int);
+    int (*to_insert_fork_catchpoint) (struct target_ops *, int);
     int (*to_remove_fork_catchpoint) (int);
     int (*to_insert_vfork_catchpoint) (int);
     int (*to_remove_vfork_catchpoint) (int);
@@ -1306,7 +1306,7 @@ void target_create_inferior (char *exec_file, char *args,
    catchpoint type is not supported and -1 for failure.  */
 
 #define target_insert_fork_catchpoint(pid) \
-     (*current_target.to_insert_fork_catchpoint) (pid)
+     (*current_target.to_insert_fork_catchpoint) (&current_target, pid)
 
 #define target_remove_fork_catchpoint(pid) \
      (*current_target.to_remove_fork_catchpoint) (pid)
This page took 0.033928 seconds and 4 git commands to generate.