* infrun.c (follow_exec): Don't do a generic mourn. Instead
authorPedro Alves <palves@redhat.com>
Mon, 22 Sep 2008 15:26:53 +0000 (15:26 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 22 Sep 2008 15:26:53 +0000 (15:26 +0000)
inline the required bits.
* breakpoint.h (enum inf_context): Add inf_execd.

gdb/ChangeLog
gdb/breakpoint.h
gdb/infrun.c

index 358cca7dfffbd6bfa3503afe8549e8f8266bae66..e0b3683cac7e5126791dc188c34d48adeef9931d 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-22  Pedro Alves  <pedro@codesourcery.com>
+
+       * infrun.c (follow_exec): Don't do a generic mourn.  Instead
+       inline the required bits.
+       * breakpoint.h (enum inf_context): Add inf_execd.
+
 2008-09-22  Pedro Alves  <pedro@codesourcery.com>
 
        * infrun.c (handle_inferior_event): In the follow exec case,
index 8bafc93aa03925c96cea20a21cf09c3425faa382..db6e9724c8eec899af131dc4a79cc3b95d32dbe9 100644 (file)
@@ -663,7 +663,8 @@ enum inf_context
   {
     inf_starting,
     inf_running,
-    inf_exited
+    inf_exited,
+    inf_execd
   };
 
 /* The possible return values for breakpoint_here_p.
index 3331152af27f1f5bca2cb6c50e87b6465f7b1309..4b4df8fabafa0aa0ac89db88bf60f8604a3e84a5 100644 (file)
@@ -331,7 +331,6 @@ follow_inferior_reset_breakpoints (void)
 static void
 follow_exec (ptid_t pid, char *execd_pathname)
 {
-  ptid_t saved_pid = pid;
   struct target_ops *tgt;
   struct thread_info *th = inferior_thread ();
 
@@ -370,9 +369,8 @@ follow_exec (ptid_t pid, char *execd_pathname)
      inferior has essentially been killed & reborn. */
 
   gdb_flush (gdb_stdout);
-  generic_mourn_inferior ();
-  /* Because mourn_inferior resets inferior_ptid. */
-  inferior_ptid = saved_pid;
+
+  breakpoint_init_inferior (inf_execd);
 
   if (gdb_sysroot && *gdb_sysroot)
     {