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

* target.h (struct target_ops) <to_has_exited>: Add argument.
(target_has_exited): Add argument.
* target.c (debug_to_has_exited): Add argument.
(update_current_target): Update.

gdb/ChangeLog
gdb/target.c
gdb/target.h

index 87f0bea..30db237 100644 (file)
@@ -1,5 +1,12 @@
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
+       * target.h (struct target_ops) <to_has_exited>: Add argument.
+       (target_has_exited): Add argument.
+       * target.c (debug_to_has_exited): Add argument.
+       (update_current_target): Update.
+
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
        * target.h (struct target_ops) <to_set_syscall_catchpoint>: Add
        argument.
        (target_set_syscall_catchpoint): Add argument.
index 74a2817..ff61461 100644 (file)
@@ -813,7 +813,7 @@ update_current_target (void)
            (int (*) (struct target_ops *, int, int, int, int, int *))
            return_one);
   de_fault (to_has_exited,
-           (int (*) (int, int, int *))
+           (int (*) (struct target_ops *, int, int, int *))
            return_zero);
   de_fault (to_can_run,
            return_zero);
@@ -4944,11 +4944,13 @@ debug_to_remove_exec_catchpoint (struct target_ops *self, int pid)
 }
 
 static int
-debug_to_has_exited (int pid, int wait_status, int *exit_status)
+debug_to_has_exited (struct target_ops *self,
+                    int pid, int wait_status, int *exit_status)
 {
   int has_exited;
 
-  has_exited = debug_target.to_has_exited (pid, wait_status, exit_status);
+  has_exited = debug_target.to_has_exited (&debug_target,
+                                          pid, wait_status, exit_status);
 
   fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n",
                      pid, wait_status, *exit_status, has_exited);
index f40dcdd..8d73472 100644 (file)
@@ -507,7 +507,7 @@ struct target_ops
     int (*to_remove_exec_catchpoint) (struct target_ops *, int);
     int (*to_set_syscall_catchpoint) (struct target_ops *,
                                      int, int, int, int, int *);
-    int (*to_has_exited) (int, int, int *);
+    int (*to_has_exited) (struct target_ops *, int, int, int *);
     void (*to_mourn_inferior) (struct target_ops *);
     int (*to_can_run) (void);
 
@@ -1368,7 +1368,8 @@ int target_follow_fork (int follow_child, int detach_fork);
    exit code of PID, if any.  */
 
 #define target_has_exited(pid,wait_status,exit_status) \
-     (*current_target.to_has_exited) (pid,wait_status,exit_status)
+     (*current_target.to_has_exited) (&current_target, \
+                                     pid,wait_status,exit_status)
 
 /* The debugger has completed a blocking wait() call.  There is now
    some process event that must be processed.  This function should