Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix 'Undefined command' error message
@ 2005-11-15 18:11 Andrew STUBBS
  2005-11-16  4:52 ` Eli Zaretskii
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew STUBBS @ 2005-11-15 18:11 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

Hi,

The following demonstrates the problem:

   (gdb) abc_def
   Undefined command: "abc".  Try "help".

Non-alphanumeric characters, such as underscore, are permitted in 
command names (including user defined commands), but are not understood 
when giving error messages.

The attached patch fixes the problem.

OK?

Andrew Stubbs

[-- Attachment #2: cli-decode.patch --]
[-- Type: text/plain, Size: 844 bytes --]

2005-11-15  Andrew Stubbs  <andrew.stubbs@st.com>

	* cli-decode.c (lookup_cmd): Allow all the same characters in
	command names that lookup_cmd_composition() does.

Index: src/gdb/cli/cli-decode.c
===================================================================
--- src.orig/gdb/cli/cli-decode.c	2005-05-26 21:49:02.000000000 +0100
+++ src/gdb/cli/cli-decode.c	2005-11-09 11:39:52.000000000 +0000
@@ -1196,7 +1196,12 @@ lookup_cmd (char **line, struct cmd_list
 	    {
 	      char *p = *line, *q;
 
-	      while (isalnum (*p) || *p == '-')
+	      while (*p && (isalnum (*p) || *p == '-' || *p == '_' ||
+#if defined(TUI)
+			    (tui_active &&
+			     (*p == '+' || *p == '<' || *p == '>' || *p == '$')) ||
+#endif
+			    (xdb_commands && (*p == '!' || *p == '/' || *p == '?'))))
 		p++;
 
 	      q = (char *) alloca (p - *line + 1);

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2005-11-24 20:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-15 18:11 [PATCH] Fix 'Undefined command' error message Andrew STUBBS
2005-11-16  4:52 ` Eli Zaretskii
2005-11-16 14:56   ` Andrew STUBBS
2005-11-16 20:19     ` Eli Zaretskii
2005-11-16 23:28   ` Daniel Jacobowitz
2005-11-17  0:10     ` Eli Zaretskii
2005-11-22  2:17       ` Andrew STUBBS
2005-11-22  2:31         ` Andreas Schwab
2005-11-23 18:58           ` Andrew STUBBS
2005-11-23 19:19             ` Eli Zaretskii
2005-11-23 21:07               ` Andrew STUBBS
2005-11-24  4:33                 ` Daniel Jacobowitz
2005-11-24 17:29                   ` Eli Zaretskii
2005-11-24 18:11                     ` Daniel Jacobowitz
2005-11-24 20:31                       ` Eli Zaretskii
2005-11-24 22:37                         ` Andrew STUBBS
2005-11-24 23:57                           ` Eli Zaretskii
2005-11-24 10:34                 ` Eli Zaretskii
2005-11-22  5:38         ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox