This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
pending/986: RFA: Patch for corefile support
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: gdb-gnats at sources dot redhat dot com
- Date: Mon, 27 Jan 2003 18:05:30 -0500
- Subject: pending/986: RFA: Patch for corefile support
>Number: 986
>Category: pending
>Synopsis: RFA: Patch for corefile support
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Fri Jan 31 05:08:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
>Description:
This is a multi-part message in MIME format.
--------------040401040407040404010603
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
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.
--------------040401040407040404010603
Content-Type: text/plain;
name="thread-db.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="thread-db.patch"
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.28
diff -u -r1.28 thread-db.c
--- thread-db.c 14 Jan 2003 00:49:04 -0000 1.28
+++ thread-db.c 27 Jan 2003 22:58:58 -0000
@@ -1007,6 +1007,11 @@
proc_handle.pid = 0;
target_beneath->to_mourn_inferior ();
+
+ /* Detach thread_db target ops. The thread_db_new_objfile routine
+ will reattach them later if needed. */
+ unpush_target (&thread_db_ops);
+ using_thread_db = 0;
}
static int
--------------040401040407040404010603--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: