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

Jérémie Galarneau jeremie.galarneau@efficios.com
Wed Feb 19 04:26:00 GMT 2020


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



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the Gdb-patches mailing list