summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2003-06-03 20:00:56 +0000
committerJeff Johnston <jjohnstn@redhat.com>2003-06-03 20:00:56 +0000
commita4593ce02529333901b455741b599b94545baab2 (patch)
treea643bfedab1e28acf3a47b1c49bc3fcd741ac666
parentd1e5881bc872109ca39ab935145894f386b373f2 (diff)
downloadgdb-a4593ce02529333901b455741b599b94545baab2.tar.gz
2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
* thread-db.c (thread_db_mourn_inferior): Unpush thread target layer if not dealing with a statically-linked threaded program.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/thread-db.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 42c01f2094a..88505df93bf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread-db.c (thread_db_mourn_inferior): Unpush thread target
+ layer if not dealing with a statically-linked threaded program.
+
2003-06-03 Kris Warkentin <kewarken@qnx.com>
* solib.c (solib_open): Update comment to reflect actual search order.
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 0a6138b3afa..a225bde9d5c 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -1011,6 +1011,18 @@ thread_db_mourn_inferior (void)
proc_handle.pid = 0;
target_beneath->to_mourn_inferior ();
+
+ /* Detach thread_db target ops if not dealing with a statically
+ linked threaded program. This allows a corefile to be debugged
+ after finishing debugging of a threaded program. At present,
+ debugging a statically-linked threaded program is broken, but
+ the check is added below in the event that it is fixed in the
+ future. */
+ if (!keep_thread_db)
+ {
+ unpush_target (&thread_db_ops);
+ using_thread_db = 0;
+ }
}
static int