aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:31:52 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:45:44 -0700
commita863b201d73bc238cbcfdbb11eac0a9ba2489a55 (patch)
treee22582ca2ca7a65c0993d6a12ea997bdf4e1748c /gdb
parent2e97a79e221eed05a015a9b37595edd09b08eb36 (diff)
downloadgdb-a863b201d73bc238cbcfdbb11eac0a9ba2489a55.zip
gdb-a863b201d73bc238cbcfdbb11eac0a9ba2489a55.tar.gz
gdb-a863b201d73bc238cbcfdbb11eac0a9ba2489a55.tar.bz2
Add target_ops argument to to_insert_fork_catchpoint
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/linux-nat.c2
-rw-r--r--gdb/target.c6
-rw-r--r--gdb/target.h4
4 files changed, 16 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 87f2d46..561333c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
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
argument.
(target_post_startup_inferior): Add argument.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 0728939..95b003f 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -696,7 +696,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
static int
-linux_child_insert_fork_catchpoint (int pid)
+linux_child_insert_fork_catchpoint (struct target_ops *self, int pid)
{
return !linux_supports_tracefork ();
}
diff --git a/gdb/target.c b/gdb/target.c
index 699b55e..a0c7214 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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);
diff --git a/gdb/target.h b/gdb/target.h
index 433925e..add3b0c 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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)