* [RFA]: Additional dead thread patch
@ 2004-06-07 21:53 Jeff Johnston
2004-06-07 21:58 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Johnston @ 2004-06-07 21:53 UTC (permalink / raw)
To: gdb-patches; +Cc: msnyder
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
After updating to current sources today, I have noticed a regression in
print-threads.exp which is due to some missing logic in my June 4th patch. The
problem is a timing issue (it does not occur for my June 4th build). There is a
gdb_assert in thread_from_lwp() which gets triggered because the th_valid flag
has not been set for a zombie thread's thread_info struct.
This patch fills in the zombie thread's thread_info private area since the
information is indeed valid and available.
Ok to commit?
-- Jeff J.
2004-06-07 Jeff Johnston <jjohnstn@redhat.com>
* thread-db.c (thread_get_info_callback): Fill in the thread_info
struct if one exists, even if we are dealing with a zombie thread.
[-- Attachment #2: thread-db.patch --]
[-- Type: text/plain, Size: 1039 bytes --]
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.41
diff -u -p -r1.41 thread-db.c
--- thread-db.c 4 Jun 2004 21:28:15 -0000 1.41
+++ thread-db.c 7 Jun 2004 21:35:57 -0000
@@ -275,12 +275,18 @@ thread_get_info_callback (const td_thrha
thread_info = find_thread_pid (thread_ptid);
/* In the case of a zombie thread, don't continue. We don't want to
- attach to it thinking it is a new thread and we don't want to mark
- it as valid. */
+ attach to it thinking it is a new thread. */
if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
{
if (infop != NULL)
*(struct thread_info **) infop = thread_info;
+ if (thread_info != NULL)
+ {
+ memcpy (&thread_info->private->th, thp, sizeof (*thp));
+ thread_info->private->th_valid = 1;
+ memcpy (&thread_info->private->ti, &ti, sizeof (ti));
+ thread_info->private->ti_valid = 1;
+ }
return TD_THR_ZOMBIE;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA]: Additional dead thread patch
2004-06-07 21:53 [RFA]: Additional dead thread patch Jeff Johnston
@ 2004-06-07 21:58 ` Daniel Jacobowitz
2004-06-07 22:36 ` Jeff Johnston
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-06-07 21:58 UTC (permalink / raw)
To: Jeff Johnston; +Cc: gdb-patches, msnyder
On Mon, Jun 07, 2004 at 05:53:47PM -0400, Jeff Johnston wrote:
> After updating to current sources today, I have noticed a regression in
> print-threads.exp which is due to some missing logic in my June 4th patch.
> The problem is a timing issue (it does not occur for my June 4th build).
> There is a gdb_assert in thread_from_lwp() which gets triggered because the
> th_valid flag has not been set for a zombie thread's thread_info struct.
>
> This patch fills in the zombie thread's thread_info private area since the
> information is indeed valid and available.
>
> Ok to commit?
>
> -- Jeff J.
>
> 2004-06-07 Jeff Johnston <jjohnstn@redhat.com>
>
> * thread-db.c (thread_get_info_callback): Fill in the thread_info
> struct if one exists, even if we are dealing with a zombie thread.
>
Yes, this is OK.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA]: Additional dead thread patch
2004-06-07 21:58 ` Daniel Jacobowitz
@ 2004-06-07 22:36 ` Jeff Johnston
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Johnston @ 2004-06-07 22:36 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, msnyder
Daniel Jacobowitz wrote:
> On Mon, Jun 07, 2004 at 05:53:47PM -0400, Jeff Johnston wrote:
>
>>After updating to current sources today, I have noticed a regression in
>>print-threads.exp which is due to some missing logic in my June 4th patch.
>>The problem is a timing issue (it does not occur for my June 4th build).
>>There is a gdb_assert in thread_from_lwp() which gets triggered because the
>>th_valid flag has not been set for a zombie thread's thread_info struct.
>>
>>This patch fills in the zombie thread's thread_info private area since the
>>information is indeed valid and available.
>>
>>Ok to commit?
>>
>>-- Jeff J.
>>
>>2004-06-07 Jeff Johnston <jjohnstn@redhat.com>
>>
>> * thread-db.c (thread_get_info_callback): Fill in the thread_info
>> struct if one exists, even if we are dealing with a zombie thread.
>>
>
>
> Yes, this is OK.
>
Patch checked in. Thanks.
-- Jeff J.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-07 22:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-07 21:53 [RFA]: Additional dead thread patch Jeff Johnston
2004-06-07 21:58 ` Daniel Jacobowitz
2004-06-07 22:36 ` Jeff Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox