aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread-db.c
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
commit043b2f77bb3d7f4b4d927ea80ffed9754cc56619 (patch)
tree3dcd87ea514d76afec12ea7dd0c83a9145c133e1 /gdb/thread-db.c
parentf43caff87cc42933ad3d52cc5f77495c7e5ba93f (diff)
downloadgdb-043b2f77bb3d7f4b4d927ea80ffed9754cc56619.zip
gdb-043b2f77bb3d7f4b4d927ea80ffed9754cc56619.tar.gz
gdb-043b2f77bb3d7f4b4d927ea80ffed9754cc56619.tar.bz2
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.
Diffstat (limited to 'gdb/thread-db.c')
-rw-r--r--gdb/thread-db.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 0a6138b..a225bde 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