aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/target.c8
-rw-r--r--gdb/target.h5
3 files changed, 15 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 87f0bea..30db237 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/target.c b/gdb/target.c
index 74a2817..ff61461 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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);
diff --git a/gdb/target.h b/gdb/target.h
index f40dcdd..8d73472 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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