RE: [PATCH] gdb/thread: fine-tune 'info threads' help text

Aktemur, Tankut Baris via Gdb-patches
2020-10-19T15:57:56Z

On Monday, October 19, 2020 5:39 PM, Simon Marchi wrote:
> On 2020-10-19 11:32 a.m., Tankut Baris Aktemur via Gdb-patches wrote:
> > The help text of 'info threads' is below:
> >
> > (gdb) help info threads
> > Display currently known threads.
> > Usage: info threads [OPTION]... [ID]...
> >
> > Options:
> > -gid
> > Show global thread IDs.If ID is given, it is a space-separated list of IDs of
> threads to display.
> > Otherwise, all threads are displayed.
> > (gdb)
> >
> > I think the "If ID is given ..." info should have come right below
> > the the usage line. This patch reorganizes the text so that we get
> >
> > (gdb) help info threads
> > Display currently known threads.
> > Usage: info threads [OPTION]... [ID]...
> > If ID is given, it is a space-separated list of IDs of threads to display.
> > Otherwise, all threads are displayed.
> >
> > Options:
> > -gid
> > Show global thread IDs.
> > (gdb)
>
> Hmm yeah, the "before" text looks erroneous.
>
> I would put a blank line just after the "Usage:", because I like when things are well
> visually separated. But it LGTM regardless.

I agree, but I checked some other arbitrary commands manually, and also did a
`grep -A 1 "Usage:" *.c`, and found that a great portion of commands do not print that
separator newline. For consistency, let me push without the newline.

-Baris

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928