summaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-07-24 18:57:32 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-07-24 18:57:32 +0000
commit18fa88ba78886c4c01cc27066c18f849046350df (patch)
tree28a4a408a11133023b2c2e6ba1b173a014ae3be3 /gdb/linux-thread-db.c
parentf9e9b79537e889b57a5b5ae46b39403ea985668c (diff)
downloadgdb-18fa88ba78886c4c01cc27066c18f849046350df.tar.gz
* linux-thread-db.c (thread_db_wait): Remove libthread_db
after exec events.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index c49c89585b4..d91a894166d 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -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. */