X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Finf-ttrace.c;h=2b9e7f536de6e83fd04a661ccd12f36fd91cce86;hb=940c3c0683afd9d13629a9104695a24ed0fa82a3;hp=a13e7496bfd5d674c4107d25261581ff373b53cd;hpb=2ea286498fd2ddceaf074bfbc9a2986777ea0396;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c index a13e7496bf..2b9e7f536d 100644 --- a/gdb/inf-ttrace.c +++ b/gdb/inf-ttrace.c @@ -457,7 +457,7 @@ 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); + detach_breakpoints (ptid_build (pid, lwpid, 0)); target_terminal_ours (); fprintf_unfiltered (gdb_stdlog, @@ -467,7 +467,11 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child) else { inferior_ptid = ptid_build (pid, lwpid, 0); - detach_breakpoints (fpid); + /* Detach any remaining breakpoints in the child. In the case + of fork events, we do not need to do this, because breakpoints + should have already been removed earlier. */ + if (tts.tts_event == TTEVT_VFORK) + detach_breakpoints (ptid_build (fpid, flwpid, 0)); target_terminal_ours (); fprintf_unfiltered (gdb_stdlog, @@ -1010,7 +1014,7 @@ inf_ttrace_wait (struct target_ops *ops, case TTEVT_BPT_SSTEP: /* Make it look like a breakpoint. */ ourstatus->kind = TARGET_WAITKIND_STOPPED; - ourstatus->value.sig = TARGET_SIGNAL_TRAP; + ourstatus->value.sig = GDB_SIGNAL_TRAP; break; #endif @@ -1324,7 +1328,7 @@ inf_ttrace_target (void) /* Prevent warning from -Wmissing-prototypes. */ -void _initialize_hppa_hpux_nat (void); +void _initialize_inf_ttrace (void); void _initialize_inf_ttrace (void)