From 3f64f7b1c773929215cd1284c891f371e4fc625f Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 24 Jul 2006 18:57:32 +0000 Subject: [PATCH] * linux-thread-db.c (thread_db_wait): Remove libthread_db after exec events. --- gdb/ChangeLog | 6 ++++++ gdb/linux-thread-db.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8ec738ae701..062c2b912ec 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2006-07-24 Jan Kratochvil + Daniel Jacobowitz + + * linux-thread-db.c (thread_db_wait): Remove libthread_db + after exec events. + 2006-07-24 Daniel Jacobowitz * NEWS: Mention Windows cross debugging support. 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. */ -- 2.30.2