This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 4/7] Per-inferior/Inferior-qualified thread IDs
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Thu, 07 Jan 2016 22:24:27 +0000
- Subject: Re: [PATCH v3 4/7] Per-inferior/Inferior-qualified thread IDs
- Authentication-results: sourceware.org; auth=none
- References: <1452085418-18300-1-git-send-email-palves at redhat dot com> <1452085418-18300-5-git-send-email-palves at redhat dot com> <568EE054 dot 7040508 at ericsson dot com>
On 01/07/2016 10:01 PM, Simon Marchi wrote:
> Oh, one comment I forgot:
>
> On 16-01-06 08:03 AM, Pedro Alves wrote:
>> + A range will be of the form
>> + <inferior_num>.<thread_number1>-<thread_number1> and will represent
>> + all the threads of inferior inferior_num with number between
>> + thread_number1 and thread_number2, inclusive. <inferior_num> can
>> + also be omitted, as in <thread_number1>-<thread_number1>, in which
>> + case GDB infers the inferior number from the current inferior.
>
> Because this class^Wstruct and associated functions are disconnected from
> the global GDB state (which is great), it would be more accurate to say
> something like "from the default passed to the constructor^Winit function.
Thanks for noticing that, I'll fix. The code used to rely on the
global state when I wrote the comment, then forgot to update it.
(While writing the tests I noticed that "info threads 1.1 2.1 3" would try
to print thread 2.3 instead of 1.3 otherwise, because "info threads" switches
context to each thread being printed, which meant that by the
time we got to "3", the current inferior was 2, while the current
inferior before the command was entered was 1.)
Thanks,
Pedro Alves