* linux-thread-db.c (thread_db_wait): Remove libthread_db
authorDaniel Jacobowitz <drow@false.org>
Mon, 24 Jul 2006 18:57:32 +0000 (18:57 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 24 Jul 2006 18:57:32 +0000 (18:57 +0000)
after exec events.

gdb/ChangeLog
gdb/linux-thread-db.c

index 8ec738a..062c2b9 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
+           Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * linux-thread-db.c (thread_db_wait): Remove libthread_db
+       after exec events.
+
 2006-07-24  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * NEWS: Mention Windows cross debugging support.
index c49c895..d91a894 100644 (file)
@@ -875,6 +875,15 @@ thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
   if (ourstatus->kind == TARGET_WAITKIND_EXITED)
     return pid_to_ptid (-1);
 
+  if (ourstatus->kind == TARGET_WAITKIND_EXECD)
+    {
+      remove_thread_event_breakpoints ();
+      unpush_target (&thread_db_ops);
+      using_thread_db = 0;
+
+      return pid_to_ptid (GET_PID (ptid));
+    }
+
   if (ourstatus->kind == TARGET_WAITKIND_STOPPED
       && ourstatus->value.sig == TARGET_SIGNAL_TRAP)
     /* Check for a thread event.  */