aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-01-13 07:26:10 -0700
committerTom Tromey <tromey@adacore.com>2025-01-15 08:20:03 -0700
commit6511d20c9d47093acb3b099ff19854e01bbe9af4 (patch)
treeabd516779a8d7a014f154a36ea39ed4eb78d289b /gdb
parentb40a9566573266501a7407708f736d73e1154c21 (diff)
downloadbinutils-6511d20c9d47093acb3b099ff19854e01bbe9af4.zip
binutils-6511d20c9d47093acb3b099ff19854e01bbe9af4.tar.gz
binutils-6511d20c9d47093acb3b099ff19854e01bbe9af4.tar.bz2
Fix help formatting for string and filename options
I happened to notice that "help add-inferior" said: -execFILENAME FILENAME is the file name of the executable to use as the main program. This is missing a space after "-exec". This patch fixes the bug. If ok'd on time I plan to check this in to the gdb-16 branch as well. Approved-by: Kevin Buettner <kevinb@redhat.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/cli/cli-option.c4
-rw-r--r--gdb/testsuite/gdb.base/options.exp6
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/cli/cli-option.c b/gdb/cli/cli-option.c
index 10a5944..34ac164 100644
--- a/gdb/cli/cli-option.c
+++ b/gdb/cli/cli-option.c
@@ -832,10 +832,10 @@ append_val_type_str (std::string &help, const option_def &opt,
help += "NUMBER|#RRGGBB";
break;
case var_string:
- help += "STRING";
+ help += " STRING";
break;
case var_filename:
- help += "FILENAME";
+ help += " FILENAME";
break;
default:
break;
diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp
index e1ad61e..a1ca39e 100644
--- a/gdb/testsuite/gdb.base/options.exp
+++ b/gdb/testsuite/gdb.base/options.exp
@@ -1162,3 +1162,9 @@ test-thread-apply
# Basic "info threads" integration tests.
test-info-threads
+
+# There was a bug where the "metasyntactic variable" was glued to the
+# option.
+gdb_test "help maintenance test-options unknown-is-operand" \
+ "-string STRING.*-filename FILENAME.*" \
+ "option help has spaces"