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: RFA: gdb linux nptl patch 1


Daniel Jacobowitz wrote:
On Wed, Jun 18, 2003 at 04:23:02PM -0700, Michael Snyder wrote:

Daniel Jacobowitz wrote:

On Wed, Jun 18, 2003 at 04:08:15PM -0700, Michael Snyder wrote:


J. Johnston wrote:
[...]


This patch proposes adding a secondary list of thread_info structs that keeps
track of the lwps. This list is kept distinct from the regular thread list.
Since manipulating either list involves common operations, some base operations
are added for generic thread_info list manipulation. The lin-lwp.c layer is
changed to add and delete lwp thread_info structs to the lwp list when lwps
are added or deleted. The linux-proc.c code is changed to iterate through the
lwp thread_info list rather than the thread list when creating the pr_status
notes.

Jeff, did you realize that lin-lwp.c already maintains a list of lwps? It even exports an iterator function. I think this list you're adding may be redundant.


No. I didn't catch that, but it is a great idea.



It exports an iterator, but you can't usefully declare the iterator's callback anywhere, since struct lwp_info is local to lin-lwp.c...


No biggie, I'll just export that into a new file lin-lwp.h (along with a prototype of the iterator).


Sounds good.  I've been using nm-linux.h for this sort of thing; but
how about... um... maybe linux-nat.h?  That's a little more generic.




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