forked from Imagelibrary/binutils-gdb
Command names: make them case sensitive
Case-insensitive search for command names is an obscure undocumented feature, which seems to be unused, is not tested and not quite consistent. Remove it. gdb/ChangeLog: * cli-decode.c (lookup_cmd_1, lookup_cmd_composition): Remove case-insensitive search.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2017-02-08 Jerome Guitton <guitton@adacore.com>
|
||||||
|
|
||||||
|
* cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
|
||||||
|
Remove case-insensitive search.
|
||||||
|
|
||||||
2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
|
2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||||
|
|
||||||
* sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
|
* sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
|
||||||
|
|||||||
@@ -1378,19 +1378,6 @@ lookup_cmd_1 (const char **text, struct cmd_list_element *clist,
|
|||||||
nfound = 0;
|
nfound = 0;
|
||||||
found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
|
found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
|
||||||
|
|
||||||
/* We didn't find the command in the entered case, so lower case it
|
|
||||||
and search again. */
|
|
||||||
if (!found || nfound == 0)
|
|
||||||
{
|
|
||||||
for (tmp = 0; tmp < len; tmp++)
|
|
||||||
{
|
|
||||||
char x = command[tmp];
|
|
||||||
|
|
||||||
command[tmp] = isupper (x) ? tolower (x) : x;
|
|
||||||
}
|
|
||||||
found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If nothing matches, we have a simple failure. */
|
/* If nothing matches, we have a simple failure. */
|
||||||
if (nfound == 0)
|
if (nfound == 0)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1731,20 +1718,6 @@ lookup_cmd_composition (const char *text,
|
|||||||
nfound = 0;
|
nfound = 0;
|
||||||
*cmd = find_cmd (command, len, cur_list, 1, &nfound);
|
*cmd = find_cmd (command, len, cur_list, 1, &nfound);
|
||||||
|
|
||||||
/* We didn't find the command in the entered case, so lower case
|
|
||||||
it and search again.
|
|
||||||
*/
|
|
||||||
if (!*cmd || nfound == 0)
|
|
||||||
{
|
|
||||||
for (tmp = 0; tmp < len; tmp++)
|
|
||||||
{
|
|
||||||
char x = command[tmp];
|
|
||||||
|
|
||||||
command[tmp] = isupper (x) ? tolower (x) : x;
|
|
||||||
}
|
|
||||||
*cmd = find_cmd (command, len, cur_list, 1, &nfound);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*cmd == CMD_LIST_AMBIGUOUS)
|
if (*cmd == CMD_LIST_AMBIGUOUS)
|
||||||
{
|
{
|
||||||
return 0; /* ambiguous */
|
return 0; /* ambiguous */
|
||||||
|
|||||||
Reference in New Issue
Block a user