This is the mail archive of the gdb@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: A target has-a 1:N threads?


Andrew Cagney <ac131313@redhat.com> writes:

> Hello,
> 
> At present GDB maintains a thread-db that contains all the "threads"
> known to GDB.  The list is cross-target.  That is, it can include both
> LWPs from the lower "process layer" and "threads" from the higher
> "thread layer".
> 
> I think the currently implicit target <-> thread relationship should
> be made more explicit:
> 
> - thread_info should point back at it's target
> - a target should let you iterate over its "threads"
> 
> This, I belive, will help clean-up the current tid:pid dance.  A
> thread would always know its target and hence thread operations would
> always be applied at the correct level.

Sure --- every thread should know how to read and write its registers,
so it needs to know which target to use for that.

I'm more concerned about the symbol table's ability to support
multiple processes, the solib list handling, and so on.  There needs
to be a data structure that represents an address space, with which we
can associate the addr->block, addr->line, and addr->symbol mappings,
the solib lists, and so on.


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