diff options
author | Pedro Alves <palves@redhat.com> | 2009-05-17 19:20:33 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-05-17 19:20:33 +0000 |
commit | b242c3c2373ba4e31c501571c8b16d26d8fd2067 (patch) | |
tree | 701867d15bd9ad5fac9af7ba2d1be395e5717188 /gdb/inf-ptrace.c | |
parent | 235f2b04aed3c632481f8db71a3ea880ad575098 (diff) | |
download | gdb-b242c3c2373ba4e31c501571c8b16d26d8fd2067.zip gdb-b242c3c2373ba4e31c501571c8b16d26d8fd2067.tar.gz gdb-b242c3c2373ba4e31c501571c8b16d26d8fd2067.tar.bz2 |
gdb/
2009-05-17 Pedro Alves <pedro@codesourcery.com>
* infrun.c (handle_inferior_event): When handling a
TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
immediatelly.
* linux-nat.c (linux_child_follow_fork): Only detach breakpoint
from the child if vforking.
* inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
breakpoints from the child here.
gdb/testsuite/
2009-05-17 Pedro Alves <pedro@codesourcery.com>
* gdb.base/foll-fork.c: Include stdlib.h. Add markers for
`gdb_get_line_number'. Call `callee' in both parent and child.
* gdb.base/foll-fork.exp (catch_fork_child_follow): Use
`gdb_get_line_number' instead of hardcoding line numbers.
(catch_fork_unpatch_child): New procedure to test detaching
breakpoints from child fork.
(tcatch_fork_parent_follow): Use `gdb_get_line_number' instead of
hardcoding line numbers.
(do_fork_tests): Run `catch_fork_unpatch_child'.
Diffstat (limited to 'gdb/inf-ptrace.c')
-rw-r--r-- | gdb/inf-ptrace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index f088ffd..7849f24 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -111,7 +111,9 @@ inf_ptrace_follow_fork (struct target_ops *ops, int follow_child) else { inferior_ptid = pid_to_ptid (pid); - detach_breakpoints (fpid); + + /* Breakpoints have already been detached from the child by + infrun.c. */ if (ptrace (PT_DETACH, fpid, (PTRACE_TYPE_ARG3)1, 0) == -1) perror_with_name (("ptrace")); |