This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit 1/3] Do not call detach_breakpoints in inf_ttrace_follow_fork.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]