This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: patch to thread_db_kill
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 04 Mar 2003 16:32:03 -0500
- Subject: RFA: patch to thread_db_kill
- Organization: Red Hat Inc.
The attached patch removes a call in thread_db_kill() which attempts
to fetch the lwp for the inferior_ptid. This call causes a problem
if the application is already killed becase an error will occur trying
to fetch information from libthread_db in thread_db_get_info(). This in
turn causes an error() call in thread_db_get_info() which throws us back to the
gdb prompt. When we are trying to quit gdb, this keeps us from exiting.
The lower-level lin-lwp layer kill function does not use the inferior_ptid.
Ok to commit?
-- Jeff J.
2003-03-04 Jeff Johnston <jjohnstn at redhat dot com>
* thread-db.c (thread_db_kill): Remove unnecessary call to lwp_from_thread().
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.29
diff -u -r1.29 thread-db.c
--- thread-db.c 2 Feb 2003 05:46:14 -0000 1.29
+++ thread-db.c 4 Mar 2003 21:18:58 -0000
@@ -964,9 +964,6 @@
static void
thread_db_kill (void)
{
- /* There's no need to save & restore inferior_ptid here, since the
- inferior isn't supposed to survive this function call. */
- inferior_ptid = lwp_from_thread (inferior_ptid);
target_beneath->to_kill ();
}