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

Tankut Baris Aktemur via Gdb-patches
2020-10-19T15:33:02Z

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)

gdb/ChangeLog:
2020-10-19 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>

* thread.c (_initialize_thread): Fine-tune the help text of
'info threads'.
---
gdb/thread.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/thread.c b/gdb/thread.c
index d4994005449..d83244383d3 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -2183,11 +2183,11 @@ _initialize_thread ()
= gdb::option::build_help (_("\
Display currently known threads.\n\
Usage: info threads [OPTION]... [ID]...\n\
+If ID is given, it is a space-separated list of IDs of threads to display.\n\
+Otherwise, all threads are displayed.\n\
\n\
Options:\n\
-%OPTIONS%\
-If ID is given, it is a space-separated list of IDs of threads to display.\n\
-Otherwise, all threads are displayed."),
+%OPTIONS%"),
info_threads_opts);

c = add_info ("threads", info_threads_command, info_threads_help.c_str ());
--
2.17.1