This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC]: fix for recycled thread ids




Daniel Jacobowitz wrote:
On Fri, Mar 19, 2004 at 02:35:40PM -0500, Jeff Johnston wrote:

Conceptually, we attach to LWPs, not to threads. That suggests to me
that the correct fix is to ask the LWP layer if the LWP is attached
rather than looking it up in the thread list in the first place. We've already got an appropriate list of LWPs though we might need a
new accessor.



I like that idea. We still have to deal with the bogus thread list entry. The routine prune_threads calls thread_db_alive and it won't realize the thread info it has is bogus because it will find the tid is valid.


Do you think this will be a problem?  My hope is that it will just look
as if the thread has 'migrated' to a new LWP.


It will have invalid state associated with it. For example, the thread info has a prev_pc field. As to all the havoc that the state may or may not cause, I think it would be a very good idea to clean it up now. Who's to say what state will be added to thread_info in the future.


-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]