This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
pending/1127: RFA: patch to thread_db_kill
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: gdb-gnats at sources dot redhat dot com
- Date: Tue, 04 Mar 2003 16:32:03 -0500
- Subject: pending/1127: RFA: patch to thread_db_kill
>Number: 1127
>Category: pending
>Synopsis: RFA: patch to thread_db_kill
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Fri Mar 07 16:58:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
>Description:
This is a multi-part message in MIME format.
--------------070008080006060408040006
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
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().
--------------070008080006060408040006
Content-Type: text/plain;
name="thread_db_kill.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="thread_db_kill.patch"
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 ();
}
--------------070008080006060408040006--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: