On 17-01-10 17:00:28, Pedro Alves wrote:
On 01/10/2017 03:28 PM, Simon Marchi wrote:
On 2017-01-10 10:19, Jerome Guitton wrote:
Yao Qi (qiyaoltc@gmail.com):
IMO, there is nothing wrong. There is no command starts from "EX".
This is a bit weird to accept upper-case EXEC-FIL then... isn't it?
(gdb) exec-fil
No executable file now.
(gdb) EXEC-FIL
No executable file now.
I agree that if GDB accepts commands in upper case, the ambiguous
command message should work accordingly.
Agreed. I thought that the manual mentioned that gdb accepts
commands in either case, but I can't find it now.
I don't find gdb accepts commands in either case in the manual, and
I am surprised that gdb does so. Actually, gdb does so since 1988!
commit 7b4ac7e1ed2c4616bce56d1760807798be87ac9e
Author: gdb-2.4+.aux.coff <gdb@fsf.org>
Date: Sat Jan 16 04:39:57 1988 +0000
gdb-2.4+.aux.coff
in lookup_cmd function,
+ /* Find end of command name. */
+
+ p = *line;
+ while (*p == '-'
+ || (*p >= 'a' && *p <= 'z')
+ || (*p >= 'A' && *p <= 'Z')
+ || (*p >= '1' && *p <= '9'))
+ {
+ if (*p >= 'A' && *p <= 'Z')
+ *p += 'a' - 'A';
+ p++;
+ }
however, I don't see any reason to do so. At least, we need to be
clear that whether gdb accepts upper case commands or not.