* [RFAv2 1/4] Implement user defined prefix.
2019-11-26 23:34 [RFAv2 0/4] More flexible user-defined commands prefixing and naming Philippe Waroquiers
2019-11-26 23:34 ` [RFAv2 2/4] Test define-prefix Philippe Waroquiers
@ 2019-11-26 23:34 ` Philippe Waroquiers
2019-11-27 21:37 ` Simon Marchi
2019-11-26 23:34 ` [RFAv2 4/4] Document define-prefix command and the use of . in command names Philippe Waroquiers
2019-11-26 23:34 ` [RFAv2 3/4] Allow . character as part of " Philippe Waroquiers
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Waroquiers @ 2019-11-26 23:34 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
This patch adds the new 'define-prefix' command that creates (or mark an
existing user defined command) as a prefix command.
This approach was preferred compared to add a -prefix option to
'define' command : with define-prefix, a command can be defined and
afterwards marked as a prefix. Also, it is easier to define a
'prefix' only command in one operation.
This patch also adds completers for the 'define' and 'document' commands.
This makes it easier for the user to type the prefixes for 'define'
and type the documented command name for 'document'.
gdb/ChangeLog
YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
* cli/cli-script.c (do_define_command): Ensure a redefined
prefix command is kept as a prefix command.
(define_prefix_command): New function.
(show_user_1): Report user defined prefixes.
(_initialize_cli_script): Create the new 'define-prefix' command.
Add completers for 'define' and 'document'.
* top.c (execute_command): If command is a user-defined prefix only
command, report the list of commands for this prefix command.
---
gdb/cli/cli-script.c | 124 +++++++++++++++++++++++++++++++++++++------
gdb/top.c | 12 +++++
2 files changed, 121 insertions(+), 15 deletions(-)
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 06cdcd6bfe..e0463cb5b7 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -29,6 +29,7 @@
#include "cli/cli-cmds.h"
#include "cli/cli-decode.h"
#include "cli/cli-script.h"
+#include "cli/cli-style.h"
#include "extension.h"
#include "interps.h"
@@ -1395,7 +1396,15 @@ do_define_command (const char *comname, int from_tty,
int q;
if (c->theclass == class_user || c->theclass == class_alias)
- q = query (_("Redefine command \"%s\"? "), c->name);
+ {
+ /* if C is a prefix command, tell the user its subcommands will
+ be kept, and ask if ok to redefine the command. */
+ if (c->prefixlist != nullptr)
+ q = query (_("Keeping subcommands of prefix command \"%s\".\n"
+ "Redefine command \"%s\"? "), c->name, c->name);
+ else
+ q = query (_("Redefine command \"%s\"? "), c->name);
+ }
else
q = query (_("Really redefine built-in command \"%s\"? "), c->name);
if (!q)
@@ -1446,10 +1455,27 @@ do_define_command (const char *comname, int from_tty,
else
cmds = *commands;
- newc = add_cmd (comname, class_user, user_defined_command,
- (c && c->theclass == class_user)
- ? c->doc : xstrdup ("User-defined."), list);
- newc->user_commands = std::move (cmds);
+ {
+ struct cmd_list_element **c_prefixlist
+ = c == nullptr ? nullptr : c->prefixlist;
+ const char *c_prefixname = c == nullptr ? nullptr : c->prefixname;
+
+ newc = add_cmd (comname, class_user, user_defined_command,
+ (c != nullptr && c->theclass == class_user)
+ ? c->doc : xstrdup ("User-defined."), list);
+ newc->user_commands = std::move (cmds);
+
+ /* If we define or re-define a command that was previously defined
+ as a prefix, keep the prefix information. */
+ if (c_prefixlist != nullptr)
+ {
+ newc->prefixlist = c_prefixlist;
+ newc->prefixname = c_prefixname;
+ /* allow_unknown: see explanation in equivalent logic in
+ define_prefix_command (). */
+ newc->allow_unknown = newc->user_commands.get () != nullptr;
+ }
+ }
/* If this new command is a hook, then mark both commands as being
tied. */
@@ -1524,6 +1550,54 @@ document_command (const char *comname, int from_tty)
c->doc = doc;
}
}
+
+/* Implementation of the "define-prefix" command. */
+
+static void
+define_prefix_command (const char *comname, int from_tty)
+{
+ struct cmd_list_element *c, **list;
+ const char *tem;
+ const char *comfull;
+
+ comfull = comname;
+ list = validate_comname (&comname);
+
+ /* Look it up, and verify that we got an exact match. */
+ tem = comname;
+ c = lookup_cmd (&tem, *list, "", -1, 1);
+ if (c != nullptr && strcmp (comname, c->name) != 0)
+ c = nullptr;
+
+ if (c != nullptr && c->theclass != class_user)
+ error (_("Command \"%s\" is built-in."), comfull);
+
+ if (c != nullptr && c->prefixlist != nullptr)
+ {
+ /* c is already a user defined prefix command. */
+ return;
+ }
+
+ /* If the command does not exist at all, create it. */
+ if (c == nullptr)
+ {
+ comname = xstrdup (comname);
+ c = add_cmd (comname, class_user, user_defined_command,
+ xstrdup ("User-defined."), list);
+ }
+
+ /* Allocate the c->prefixlist, which marks the command as a prefix
+ command. */
+ c->prefixlist = new struct cmd_list_element*;
+ *(c->prefixlist) = nullptr;
+ c->prefixname = xstrprintf ("%s ", comfull);
+ /* If the prefix command C is not a command, then it must be followed
+ by known subcommands. Otherwise, if C is also a normal command,
+ it can be followed by C args that must not cause a 'subcommand'
+ not recognised error, and thus we must allow unknown. */
+ c->allow_unknown = c->user_commands.get () != nullptr;
+}
+
\f
/* Used to implement source_command. */
@@ -1564,7 +1638,21 @@ void
show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name,
struct ui_file *stream)
{
- struct command_line *cmdlines;
+ if (cli_user_command_p (c))
+ {
+ struct command_line *cmdlines = c->user_commands.get ();
+
+ fprintf_filtered (stream, "User %scommand \"",
+ c->prefixlist == NULL ? "" : "prefix ");
+ fprintf_styled (stream, title_style.style (), "%s%s",
+ prefix, name);
+ fprintf_filtered (stream, "\":\n");
+ if (cmdlines)
+ {
+ print_command_lines (current_uiout, cmdlines, 1);
+ fputs_filtered ("\n", stream);
+ }
+ }
if (c->prefixlist != NULL)
{
@@ -1573,25 +1661,23 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name,
for (c = *c->prefixlist; c != NULL; c = c->next)
if (c->theclass == class_user || c->prefixlist != NULL)
show_user_1 (c, prefixname, c->name, gdb_stdout);
- return;
}
- cmdlines = c->user_commands.get ();
- fprintf_filtered (stream, "User command \"%s%s\":\n", prefix, name);
-
- if (!cmdlines)
- return;
- print_command_lines (current_uiout, cmdlines, 1);
- fputs_filtered ("\n", stream);
}
void
_initialize_cli_script (void)
{
- add_com ("document", class_support, document_command, _("\
+ struct cmd_list_element *c;
+
+ /* "document", "define" and "define-prefix" use command_completer,
+ as this helps the user to either type the command name and/or
+ its prefixes. */
+ c = add_com ("document", class_support, document_command, _("\
Document a user-defined command.\n\
Give command name as argument. Give documentation on following lines.\n\
End with a line of just \"end\"."));
+ set_cmd_completer (c, command_completer);
define_cmd_element = add_com ("define", class_support, define_command, _("\
Define a new command name. Command name is argument.\n\
Definition appears on following lines, one command per line.\n\
@@ -1600,6 +1686,14 @@ Use the \"document\" command to give documentation for the new command.\n\
Commands defined in this way may accept an unlimited number of arguments\n\
accessed via $arg0 .. $argN. $argc tells how many arguments have\n\
been passed."));
+ set_cmd_completer (define_cmd_element, command_completer);
+ c = add_com ("define-prefix", class_support, define_prefix_command,
+ _("\
+Define or mark a command as a user-defined prefix command.\n\
+User defined prefix commands can be used as prefix commands for\n\
+other user defined commands.\n\
+If the command already exists, it is changed to a prefix command."));
+ set_cmd_completer (c, command_completer);
while_cmd_element = add_com ("while", class_support, while_command, _("\
Execute nested commands WHILE the conditional expression is non zero.\n\
diff --git a/gdb/top.c b/gdb/top.c
index 2953eac819..e8ed3b2747 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -627,6 +627,18 @@ execute_command (const char *p, int from_tty)
/* c->user_commands would be NULL in the case of a python command. */
if (c->theclass == class_user && c->user_commands)
execute_user_command (c, arg);
+ else if (c->theclass == class_user
+ && c->prefixlist && !c->allow_unknown)
+ /* If this is a user defined prefix that does not allow unknown
+ (in other words, C is a prefix command and not a command
+ that can be followed by its args), report the list of
+ subcommands. */
+ {
+ printf_unfiltered
+ ("\"%.*s\" must be followed by the name of a subcommand.\n",
+ (int) strlen (c->prefixname) - 1, c->prefixname);
+ help_list (*c->prefixlist, c->prefixname, all_commands, gdb_stdout);
+ }
else if (c->type == set_cmd)
do_set_command (arg, from_tty, c);
else if (c->type == show_cmd)
--
2.20.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFAv2 4/4] Document define-prefix command and the use of . in command names.
2019-11-26 23:34 [RFAv2 0/4] More flexible user-defined commands prefixing and naming Philippe Waroquiers
2019-11-26 23:34 ` [RFAv2 2/4] Test define-prefix Philippe Waroquiers
2019-11-26 23:34 ` [RFAv2 1/4] Implement user defined prefix Philippe Waroquiers
@ 2019-11-26 23:34 ` Philippe Waroquiers
2019-11-27 5:21 ` Eli Zaretskii
2019-11-26 23:34 ` [RFAv2 3/4] Allow . character as part of " Philippe Waroquiers
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Waroquiers @ 2019-11-26 23:34 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
gdb/ChangeLog
YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
* NEWS: Mention define-prefix. Tell that command names can now
contain a . character.
gdb/doc/ChangeLog
YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.texinfo (Define): Indicate that user-defined prefix can
be used in 'define' command. Document 'define-prefix' command.
---
gdb/NEWS | 9 +++++++++
gdb/doc/gdb.texinfo | 40 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/gdb/NEWS b/gdb/NEWS
index 5fd0f41318..431926e9b0 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -33,6 +33,12 @@
provide the exitcode or exit status of the shell commands launched by
GDB commands such as "shell", "pipe" and "make".
+* The command define-prefix can now define user defined prefix commands.
+ User defined commands can now be defined using these user defined prefix
+ commands.
+
+* Command names can now use the . character.
+
* The RX port now supports XML target descriptions.
* GDB now shows the Ada task names at more places, e.g. in task switching
@@ -96,6 +102,9 @@ pipe -d DELIM COMMAND DELIM SHELL_COMMAND
With no COMMAND, repeat the last executed command
and send its output to SHELL_COMMAND.
+define-prefix COMMAND
+ Define or mark a command as a user-defined prefix command.
+
with SETTING [VALUE] [-- COMMAND]
w SETTING [VALUE] [-- COMMAND]
Temporarily set SETTING, run COMMAND, and restore SETTING.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index e3be0cdf01..f296a7a214 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -26525,8 +26525,9 @@ end
Define a command named @var{commandname}. If there is already a command
by that name, you are asked to confirm that you want to redefine it.
The argument @var{commandname} may be a bare command name consisting of letters,
-numbers, dashes, and underscores. It may also start with any predefined
-prefix command. For example, @samp{define target my-target} creates
+numbers, dashes, dots, and underscores. It may also start with any
+predefined or user-defined prefix command.
+For example, @samp{define target my-target} creates
a user-defined @samp{target my-target} command.
The definition of the command is made up of other @value{GDBN} command lines,
@@ -26547,6 +26548,41 @@ You may use the @code{document} command again to change the
documentation of a command. Redefining the command with @code{define}
does not change the documentation.
+@kindex define-prefix
+@item define-prefix @var{commandname}
+Define or mark the command @var{commandname} as a user-defined prefix
+command. Once marked, @var{commandname} can be used as prefix command
+by the @code{define} command.
+Note that @code{define-prefix} can be used with a not yet defined
+@var{commandname}. In such a case, @var{commandname} is defined as
+an empty user-defined command.
+In case you redefine a command that was marked as a user-defined
+prefix command, the subcommands of the redefined command are kept
+(and @value{GDBN} indicates so to the user).
+
+Example:
+@example
+(gdb) define-prefix abc
+(gdb) define-prefix abc def
+(gdb) define abc def ghi
+Type commands for definition of "abc def ghi".
+End with a line saying just "end".
+>echo command ghi\n
+>end
+(gdb) define abc def
+Keeping subcommands of prefix command "def".
+Redefine command "def"? (y or n) y
+Type commands for definition of "abc def".
+End with a line saying just "end".
+>echo command def\n
+>end
+(gdb) abc def ghi
+command ghi
+(gdb) abc def
+command def
+(gdb)
+@end example
+
@kindex dont-repeat
@cindex don't repeat command
@item dont-repeat
--
2.20.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFAv2 3/4] Allow . character as part of command names.
2019-11-26 23:34 [RFAv2 0/4] More flexible user-defined commands prefixing and naming Philippe Waroquiers
` (2 preceding siblings ...)
2019-11-26 23:34 ` [RFAv2 4/4] Document define-prefix command and the use of . in command names Philippe Waroquiers
@ 2019-11-26 23:34 ` Philippe Waroquiers
2019-11-27 21:44 ` Simon Marchi
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Waroquiers @ 2019-11-26 23:34 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
This patch adds . as an allowed character for user defined commands.
Combined with 'define-prefix', this allows to e.g. define a set of Valgrind
specific user command corresponding to the Valgrind monitor commands
(such as check_memory, v.info, v.set, ...).
gdb/ChangeLog
YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
* command.h (valid_cmd_char_p): Declare.
* cli/cli-decode.c (valid_cmd_char_p): New function factorizing
the check of valid command char.
(find_command_name_length, valid_user_defined_cmd_name_p): Use
valid_cmd_char_p.
* cli/cli-script.c (validate_comname): Likewise.
* completer.c (gdb_completer_command_word_break_characters):
Do not remove . from the word break char, update comments.
(complete_line_internal_1): Use valid_cmd_char_p.
* guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
* python/py-cmd.c (gdbpy_parse_command_name): Likewise.
gdb/testsuite/ChangeLog
YYYY-MM-DD Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/define.exp: Test . in command names.
* gdb.base/setshow.exp: Update test, as . is now part of
command name.
---
gdb/cli/cli-decode.c | 24 ++++++++++++++----------
gdb/cli/cli-script.c | 2 +-
gdb/command.h | 8 ++++++++
gdb/completer.c | 10 +++++-----
gdb/guile/scm-cmd.c | 5 +----
gdb/python/py-cmd.c | 5 +----
gdb/testsuite/gdb.base/define.exp | 25 +++++++++++++++++++++++++
gdb/testsuite/gdb.base/setshow.exp | 2 +-
8 files changed, 56 insertions(+), 25 deletions(-)
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 7ace72fb7e..307fd1e826 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -1372,7 +1372,7 @@ find_command_name_length (const char *text)
if (*p == '!' || *p == '|')
return 1;
- while (isalnum (*p) || *p == '-' || *p == '_'
+ while (valid_cmd_char_p (*p)
/* Characters used by TUI specific commands. */
|| *p == '+' || *p == '<' || *p == '>' || *p == '$')
p++;
@@ -1380,9 +1380,18 @@ find_command_name_length (const char *text)
return p - text;
}
-/* Return TRUE if NAME is a valid user-defined command name.
- This is a stricter subset of all gdb commands,
- see find_command_name_length. */
+/* See command.h. */
+
+bool
+valid_cmd_char_p (int c)
+{
+ /* Alas "42" is a legitimate user-defined command.
+ In the interests of not breaking anything we preserve that. */
+
+ return isalnum (c) || c == '-' || c == '_' || c == '.';
+}
+
+/* See command.h. */
bool
valid_user_defined_cmd_name_p (const char *name)
@@ -1392,14 +1401,9 @@ valid_user_defined_cmd_name_p (const char *name)
if (*name == '\0')
return false;
- /* Alas "42" is a legitimate user-defined command.
- In the interests of not breaking anything we preserve that. */
-
for (p = name; *p != '\0'; ++p)
{
- if (isalnum (*p)
- || *p == '-'
- || *p == '_')
+ if (valid_cmd_char_p (*p))
; /* Ok. */
else
return false;
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index e0463cb5b7..79c499a4c2 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1342,7 +1342,7 @@ validate_comname (const char **comname)
p = *comname;
while (*p)
{
- if (!isalnum (*p) && *p != '-' && *p != '_')
+ if (!valid_cmd_char_p (*p))
error (_("Junk in argument list: \"%s\""), p);
p++;
}
diff --git a/gdb/command.h b/gdb/command.h
index cf190ef649..5384a0a674 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -133,8 +133,16 @@ extern struct cli_suppress_notification cli_suppress_notification;
/* API to the manipulation of command lists. */
+/* Return TRUE if NAME is a valid user-defined command name.
+ This is a stricter subset of all gdb commands,
+ see find_command_name_length. */
+
extern bool valid_user_defined_cmd_name_p (const char *name);
+/* Return TRUE if C is a valid command character. */
+
+extern bool valid_cmd_char_p (int c);
+
/* Const-correct variant of the above. */
extern struct cmd_list_element *add_cmd (const char *, enum command_class,
diff --git a/gdb/completer.c b/gdb/completer.c
index b34b7762c6..6658da6d7f 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -102,13 +102,13 @@ enum explicit_location_match_type
/* Variables which are necessary for fancy command line editing. */
-/* When completing on command names, we remove '-' from the list of
+/* When completing on command names, we remove '-' and '.' from the list of
word break characters, since we use it in command names. If the
readline library sees one in any of the current completion strings,
it thinks that the string needs to be quoted and automatically
supplies a leading quote. */
static const char gdb_completer_command_word_break_characters[] =
-" \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,";
+" \t\n!@#$%^&*()+=|~`}{[]\"';:?/><,";
/* When completing on file names, we remove from the list of word
break characters any characters that are commonly used in file
@@ -1284,7 +1284,7 @@ complete_line_internal_1 (completion_tracker &tracker,
on command strings (as opposed to strings supplied by the
individual command completer functions, which can be any string)
then we will switch to the special word break set for command
- strings, which leaves out the '-' character used in some
+ strings, which leaves out the '-' and '.' character used in some
commands. */
set_rl_completer_word_break_characters
(current_language->la_word_break_characters());
@@ -1347,7 +1347,7 @@ complete_line_internal_1 (completion_tracker &tracker,
/* lookup_cmd_1 advances p up to the first ambiguous thing, but
doesn't advance over that thing itself. Do so now. */
q = p;
- while (*q && (isalnum (*q) || *q == '-' || *q == '_'))
+ while (valid_cmd_char_p (*q))
++q;
if (q != tmp_command + point)
{
@@ -1435,7 +1435,7 @@ complete_line_internal_1 (completion_tracker &tracker,
q = p;
while (q > tmp_command)
{
- if (isalnum (q[-1]) || q[-1] == '-' || q[-1] == '_')
+ if (valid_cmd_char_p (q[-1]))
--q;
else
break;
diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c
index f2fa40e453..3b8195b8b4 100644
--- a/gdb/guile/scm-cmd.c
+++ b/gdb/guile/scm-cmd.c
@@ -492,10 +492,7 @@ gdbscm_parse_command_name (const char *name,
lastchar = i;
/* Find first character of the final word. */
- for (; i > 0 && (isalnum (name[i - 1])
- || name[i - 1] == '-'
- || name[i - 1] == '_');
- --i)
+ for (; i > 0 && valid_cmd_char_p (name[i - 1]); --i)
;
result = (char *) xmalloc (lastchar - i + 2);
memcpy (result, &name[i], lastchar - i + 1);
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index 38973401a8..8d6f01b78f 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -372,10 +372,7 @@ gdbpy_parse_command_name (const char *name,
lastchar = i;
/* Find first character of the final word. */
- for (; i > 0 && (isalnum (name[i - 1])
- || name[i - 1] == '-'
- || name[i - 1] == '_');
- --i)
+ for (; i > 0 && valid_cmd_char_p (name[i - 1]); --i)
;
result = (char *) xmalloc (lastchar - i + 2);
memcpy (result, &name[i], lastchar - i + 1);
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index d7d4fd03ba..b5183eceec 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -130,6 +130,31 @@ gdb_test "help nextwhere" \
" A next command that first shows you where you're stepping from.*" \
"preserve whitespace in help string"
+# Verify that GDB allows a user to use . in a command name.
+#
+gdb_test_multiple "define dot.command" "define user command: dot.command" {
+ -re "Type commands for definition of \"dot.command\".\r\nEnd with a line saying just \"end\".\r\n>$" {
+ gdb_test "echo dot command\\n\nend" "" \
+ "define user command: dot.command"
+ }
+}
+
+# Verify that dot.command works.
+#
+gdb_test "dot.command" \
+ "dot command" \
+ "full name dot.command"
+gdb_test "dot" \
+ "dot command" \
+ "partial name dot"
+gdb_test "dot." \
+ "dot command" \
+ "partial name dot."
+gdb_test "dot.c" \
+ "dot command" \
+ "partial name dot.c"
+
+
# Verify that the command parser doesn't require a space after an 'if'
# command in a user defined function.
#
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index 717bcc3270..394967babf 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -355,7 +355,7 @@ gdb_test_no_output "set verbose off" "set verbose off"
gdb_test "show verbose" "Verbosity is off..*" "show verbose (off)"
#test argument must be preceded by space
foreach x {"history file" "solib-search-path" "data-directory"} {
- foreach y {"/home/" "." "~/home" "=home"} {
+ foreach y {"/home/" "~/home" "=home"} {
gdb_test "set $x$y" "Argument must be preceded by space." \
"$x is not set to $y"
}
--
2.20.1
^ permalink raw reply [flat|nested] 9+ messages in thread