* A target has-a 1:N threads?
@ 2003-10-09 14:08 Andrew Cagney
2003-10-09 15:40 ` Andrew Cagney
2003-10-09 19:50 ` Jim Blandy
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-10-09 14:08 UTC (permalink / raw)
To: gdb
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.
thoughts?
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A target has-a 1:N threads?
2003-10-09 14:08 A target has-a 1:N threads? Andrew Cagney
@ 2003-10-09 15:40 ` Andrew Cagney
2003-10-09 16:10 ` Andrew Cagney
2003-10-09 19:50 ` Jim Blandy
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2003-10-09 15:40 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
> 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.
Make that 0:N threads. I forgot the targets that don't have threads.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A target has-a 1:N threads?
2003-10-09 15:40 ` Andrew Cagney
@ 2003-10-09 16:10 ` Andrew Cagney
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-10-09 16:10 UTC (permalink / raw)
To: gdb
>> 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.
>
> Make that 0:N threads. I forgot the targets that don't have threads.
It's really, really not my day.
The "0" is for the case where nothing has executed. For instance, a not
yet running executable (Kevin's e-mail under another related
thread^D^D^D^Dtopic raised it). Once the executable has executed,
there's at least one "thread".
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A target has-a 1:N threads?
2003-10-09 14:08 A target has-a 1:N threads? Andrew Cagney
2003-10-09 15:40 ` Andrew Cagney
@ 2003-10-09 19:50 ` Jim Blandy
2003-10-09 20:19 ` Paul Koning
2003-10-09 22:00 ` Andrew Cagney
1 sibling, 2 replies; 6+ messages in thread
From: Jim Blandy @ 2003-10-09 19:50 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A target has-a 1:N threads?
2003-10-09 19:50 ` Jim Blandy
@ 2003-10-09 20:19 ` Paul Koning
2003-10-09 22:00 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Paul Koning @ 2003-10-09 20:19 UTC (permalink / raw)
To: jimb; +Cc: ac131313, gdb
>>>>> "Jim" == Jim Blandy <jimb@redhat.com> writes:
Jim> I'm more concerned about the symbol table's ability to support
Jim> multiple processes, the solib list handling, and so on.
That could be very powerful when using gdb to analyze kernel (or, more
accurately, whole-system) crash dumps.
paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A target has-a 1:N threads?
2003-10-09 19:50 ` Jim Blandy
2003-10-09 20:19 ` Paul Koning
@ 2003-10-09 22:00 ` Andrew Cagney
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-10-09 22:00 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb
> 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.
Fortunatly, the change of making the 0:N target has-a thread
relationship explicit isn't directly dependant on other changes. That
lets me delay worrying about your problem until a later date (and
perhaphs by then you will have worred it into a solution :-)
enjoy,
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-09 22:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-09 14:08 A target has-a 1:N threads? Andrew Cagney
2003-10-09 15:40 ` Andrew Cagney
2003-10-09 16:10 ` Andrew Cagney
2003-10-09 19:50 ` Jim Blandy
2003-10-09 20:19 ` Paul Koning
2003-10-09 22:00 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox