diff options
author | Mark Kettenis <kettenis@gnu.org> | 2015-03-04 14:22:42 +0100 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2015-03-04 14:36:12 +0100 |
commit | e85e8e5effcfa1a1834fdbf899e167da6dccd2cd (patch) | |
tree | 2f7b717f2a2d751318160e7159b9111abdf2a5b9 /gdb/inf-ptrace.c | |
parent | 8ef229f32be156f374b8b5e3c63dba735a81fe55 (diff) | |
download | gdb-e85e8e5effcfa1a1834fdbf899e167da6dccd2cd.zip gdb-e85e8e5effcfa1a1834fdbf899e167da6dccd2cd.tar.gz gdb-e85e8e5effcfa1a1834fdbf899e167da6dccd2cd.tar.bz2 |
Make "catch fork" work on systems with PT_GET_PROCESS_STATE
These systems (OpenBSD and HP-UX 10.x) already support follow-fork
including the events needed to for "catch fork". This just makes
the upper layers realize this.
gdb/
2015-03-04 Mark Kettenis <kettenis@gnu.org>
* inf-ptrace.c [PT_GET_PROCESS_STATE]
(inf_ptrace_insert_fork_catchpoint): New function.
(inf_ptrace_remove_fork_catchpoint): New function.
(inf_ptrace_target) [PT_GET_PROCESS_STATE]: Install them.
Diffstat (limited to 'gdb/inf-ptrace.c')
-rw-r--r-- | gdb/inf-ptrace.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 3502a12..cd58dfb 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -58,6 +58,18 @@ inf_ptrace_follow_fork (struct target_ops *ops, int follow_child, return 0; } +static int +inf_ptrace_insert_fork_catchpoint (struct target_ops *self, int pid) +{ + return 0; +} + +static int +inf_ptrace_remove_fork_catchpoint (struct target_ops *self, int pid) +{ + return 0; +} + #endif /* PT_GET_PROCESS_STATE */ @@ -666,6 +678,8 @@ inf_ptrace_target (void) t->to_create_inferior = inf_ptrace_create_inferior; #ifdef PT_GET_PROCESS_STATE t->to_follow_fork = inf_ptrace_follow_fork; + t->to_insert_fork_catchpoint = inf_ptrace_insert_fork_catchpoint; + t->to_remove_fork_catchpoint = inf_ptrace_remove_fork_catchpoint; t->to_post_startup_inferior = inf_ptrace_post_startup_inferior; t->to_post_attach = inf_ptrace_post_attach; #endif |