This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/commit 1/3] Do not call detach_breakpoints in inf_ttrace_follow_fork.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Thu, 14 Jun 2012 11:29:03 -0700
- Subject: [RFA/commit 1/3] Do not call detach_breakpoints in inf_ttrace_follow_fork.
- References: <1339698545-13126-1-git-send-email-brobecker@adacore.com>
These calls are unnecessary because handle_inferior_events already
called detach_breakpoints for us before calling the target_ops'
to_follow_fork hook. Without this change, we would get a warning
when trying to remove the breakpoint the second time, because
the ia64 code detects that the breakpoint address does not point
to a breakpoint instruction (any more):
warning: Cannot remove breakpoint at address 0x4000000000000d52, no break instruction at such address.
gdb/ChangeLog:
* inf-ttrace.c (inf_ttrace_follow_fork): Remove calls to
detach_breakpoints.
I am sufficiently confident in this patch that I think I can commit
on my own, but a second pair of eyes wouldn't hurt...
---
gdb/inf-ttrace.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 2c620d5..ffe56e1 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -457,7 +457,6 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child)
inf->pspace = parent_inf->pspace;
inf->aspace = parent_inf->aspace;
copy_terminal_info (inf, parent_inf);
- detach_breakpoints (pid);
target_terminal_ours ();
fprintf_unfiltered (gdb_stdlog,
@@ -467,7 +466,6 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child)
else
{
inferior_ptid = ptid_build (pid, lwpid, 0);
- detach_breakpoints (fpid);
target_terminal_ours ();
fprintf_unfiltered (gdb_stdlog,
--
1.7.1