Re: info thread

Daniel Jacobowitz
2006-09-19T21:03:23Z

On Wed, Sep 20, 2006 at 08:53:19AM +1200, Nick Roberts wrote:
> There is no specification so we can only guess what was intended. Perhaps
> -thread-info was just meant to give info for the selected thread which
> presumably would not take long to compute even with all the details. In any
> case, as Daniel says, the problem is to devise one(s) which is/are generally
> useful.
>
> I would guess the reason that they haven't already been implemented is that
> the other information is kernel/OS dependent e.g on GNU/Linux I get:

This isn't really relevant. It breaks down into just a few parts in GDB
parlance:

- The GDB ID. That's "1", "2", et cetera in your example.
- The thread ID, produced by to_pid_to_str, e.g. "Thread -BLAH (LWP
BLAH)". This is just a string.
- The thread extra info. Not present in your example, but e.g.
"(Exiting)" or "(not ready)".
- The thread's current stack frame.

That last, I think, is not useful in MI. There's commands to fetch it
when it's wanted, and it might not be by some consumers. And it will
show up with -thread-select already. So, I would recommend including
only the GDB ID (as from -thread-list-ids) and the additional
information.

Whether they should be one field or two is anybody's guess.

--
Daniel Jacobowitz
CodeSourcery