2012-10-26 Pedro Alves <palves@redhat.com>
[deliverable/binutils-gdb.git] / gdb / inf-ttrace.c
index a13e7496bfd5d674c4107d25261581ff373b53cd..2b9e7f536de6e83fd04a661ccd12f36fd91cce86 100644 (file)
@@ -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)
 \f
 
 /* Prevent warning from -Wmissing-prototypes.  */
-void _initialize_hppa_hpux_nat (void);
+void _initialize_inf_ttrace (void);
 
 void
 _initialize_inf_ttrace (void)
This page took 0.023598 seconds and 4 git commands to generate.