[PATCH v2] gdb: print thread names in thread apply command output

Simon Marchi simark@simark.ca
Wed Feb 26 21:45:00 GMT 2020


On 2020-02-18 11:24 p.m., Jérémie Galarneau wrote:
> On Tue, 18 Feb 2020 at 15:57, Tom Tromey <tom@tromey.com> wrote:
>>
>>>>>>> "Jérémie" == Jérémie Galarneau <jeremie.galarneau@efficios.com> writes:
>>
>> Jérémie> This situation arises in the `gdb.threads/threadapply.exp` test which
>> Jérémie> kills and removes the inferior as part of a "thread apply" command.
>>
>> Thank you for the patch.
>>
>> Jérémie> +  /* The thread header is computed before running the command since
>> Jérémie> +     the command can change the inferior, which is not permitted
>> Jérémie> +     by thread_target_id_str.  */
>> Jérémie> +  std::string thr_header =
>> Jérémie> +    string_printf(_("\nThread %s (%s):\n"), print_thread_id (thr),
>> Jérémie> +                thread_target_id_str (thr).c_str ());
>>
>> Missing a space before the "(" after string_printf here.
>>
>> IIUC this is fixing a latent bug, is that correct?
> 
> Hi Tom,
> 
> This is not a bug fix. AFAIK, this information has never been provided
> as part of that command's output.
> 
> Thanks for the comments!
> Jérémie
> 
>>
>> Anyway this looks ok to me with that nit fixed.
>>
>> Tom

FYI, I pushed it with that fixed.

Simon



More information about the Gdb-patches mailing list