Re: [PATCHv3 2/3] gdb: Restore previously selected thread when switching inferior

Eli Zaretskii via Gdb-patches
2020-09-26T06:09:51Z

> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Fri, 25 Sep 2020 23:24:08 +0100
>
> This commit adds a new option that allows the user to control how GDB
> behaves when switching between multi-threaded inferiors.

Thanks. Some commas are missing, see below.

> +set restore-selected-thread on|off
> +show restore-selected-thread
> + This new option is off by default.

This sentence is redundant in NEWS, and IMO should be removed.

> + When turned on GDB will record
^
Please add a comma there.

> + the currently selected thread in each inferior. When switching
> + between inferiors GDB will attempt to restore the previously
^
And here.

> + selected thread in the inferior being switched too. If the
> + previously selected thread is no longer available then GDB falls
^
And there.

> +When switching between inferiors with multiple threads
> +(@pxref{Threads}) @value{GDBN} will select the first non-exited thread
^
Likewise.

> +in the inferior being switched to and make this the current thread.
^
Same.

> +When this option is on @value{GDBN} will record the currently selected
^
Here as well.

> +thread in each inferior. When switching between inferior @value{GDBN}
^
And here. Also, I think you meant "between inferiors", plural.

> -Otherwise, only @var{thread-num} is shown.
> +Otherwise, only @var{thread-num} is shown. When switching between
> +inferiors @value{GDBN} will select a suitable thread in the inferior
^
Please add a comma here.

> +being switched to, see @ref{inferior command,,the @code{inferior}
> +command} for further details on how to control this behaviour.
^
And here.

The documentation parts are okay with these fixed.