This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add "thread-group id" and "id in thread-group" info to -thread-info output
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Fri, 24 Feb 2017 15:22:46 -0500
- Subject: Re: [PATCH] Add "thread-group id" and "id in thread-group" info to -thread-info output
- Authentication-results: sourceware.org; auth=none
- References: <20170119144130.4341-1-simon.marchi@ericsson.com> <7bbd57e2-f35d-88fe-8b44-4bb5dff9b60b@ericsson.com> <2b68f0be-721b-08da-079f-9c1e05ae98b7@redhat.com>
On 2017-02-23 14:49, Pedro Alves wrote:
Hi Simon,
On 02/20/2017 04:17 PM, Simon Marchi wrote:
Ping.
The code itself looks fine to me.
However, this needs manual and NEWS changes.
Of course, forgot about that.
And, I think you should also test what is printed before you
add the second inferior. This is because while the CLI
only prints qualified IDs after adding the second inferior,
MI is always printing them. We should add a test to make sure
that continues to be the case even if someone changes/refactors
the code.
Ok.
While writing the documentation parts, these question popped to mind:
- The type of the id-in-tg field (a string) assumes that a thread
belongs to a single group. Currently, the only kind of "thread-group"
we have is inferiors. The thread-group terminology suggests that in the
future we might have other kinds of thread groups, like user-defined
arbitrary groups. Otherwise, why would MI use "thread group" instead of
"inferior"? Because of this, do you think that the type of the field
will be limiting? For example, should we document right that this field
can be a list, when a thread is part of multiple groups, for example?
- The format of the id-in-tg field is "1" for inferior/thread-group 1.
In -list-thread-groups, the id is shown as "i1". Again, if there are
other kinds of groups later, we can assume that we'll need to
differentiate the type, so just "1" won't work. For this reason and for
consistency with the result of -list-thread-groups, should we show "i1"
here as well?
Thanks,
Simon