2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
[deliverable/binutils-gdb.git] / gdb / thread-db.c
index 0a6138b3afa0be6b8e9ee2daf9d500850bfdf40b..a225bde9d5c9aa7457754ae8bcda1a0cc00fb047 100644 (file)
@@ -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
This page took 0.03596 seconds and 4 git commands to generate.