Michael Snyder wrote: > "J. Johnston" wrote: > >>The attached patch fixes a problem in gdb when a corefile is read in >>after a multithreaded application has been debugged. What happens is that >>the thread-db and lin-lwp layers are still around and run into internal >>errors. >> >>The solution is simply to unpush the thread-db ops in its mourn_inferior >>routine. If a corefile gets loaded, there is no thread-db to interfere. >>If another multi-threaded app gets loaded, the thread_db_new_objfile is >>designed to bring back the thread-db layer as needed. >> >>This fix solves another failure in the killed.exp testsuite as well. >> >>Ok to commit? >> >>-- Jeff J. > > > Hi Jeff, > > After reviewing the discussion, why don't you add a test for > "keep_thread_db" as suggested by Mark, and check this in? > Perhaps with a comment explaining that the debugging of > statically-linked threaded programs is currently broken, but > this will preserve sanity in case it is ever fixed. > > Michael > > Thanks Michael. The attached patch has been checked in with the following ChangeLog. 2003-06-03 Jeff Johnston * thread-db.c (thread_db_mourn_inferior): Unpush thread target layer if not dealing with a statically-linked threaded program. -- Jeff J.