From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75052 invoked by alias); 31 Jan 2017 14:39:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 75037 invoked by uid 89); 31 Jan 2017 14:39:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=H*r:10.10.0, well!, obscure X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 31 Jan 2017 14:39:43 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 901168146C; Tue, 31 Jan 2017 15:39:41 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OByhZoafjnfE; Tue, 31 Jan 2017 15:39:41 +0100 (CET) Received: from chelles.act-europe.fr (chelles.act-europe.fr [10.10.0.160]) by smtp.eu.adacore.com (Postfix) with ESMTP id 78EBE81454; Tue, 31 Jan 2017 15:39:41 +0100 (CET) Received: by chelles.act-europe.fr (Postfix, from userid 560) id 2F8971EA0068; Tue, 31 Jan 2017 15:39:41 +0100 (CET) Date: Tue, 31 Jan 2017 14:39:00 -0000 From: Jerome Guitton To: Luis Machado Cc: Pedro Alves , Yao Qi , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [RFA] candidates for ambiguous command in upper case Message-ID: <20170131143941.GB22056@adacore.com> References: <20170110151944.GD27546@adacore.com> <2c7e674b-e827-f433-cbaf-a3d1a20cba80@redhat.com> <20170111172550.GL9518@E107787-LIN> <20170112101854.GL27546@adacore.com> <85ecb095-a990-6f15-4fe9-5addffb3a5d0@redhat.com> <20170116163210.GG27546@adacore.com> <6872438c-e93a-77e8-79a3-c8e1f05aa283@codesourcery.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="p4qYPpj5QlsIQJ0K" Content-Disposition: inline In-Reply-To: <6872438c-e93a-77e8-79a3-c8e1f05aa283@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2017-01/txt/msg00660.txt.bz2 --p4qYPpj5QlsIQJ0K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 362 Luis Machado (lgustavo@codesourcery.com): > >>So, what do we want to do? > >>1. Remove the feature? > >>2. Improve its consistency? > >>3. Keep things as is? > >> > > > >I vote #1. > > I don't see a problem with #1 as long as we keep it consistent > throughout from now on. OK, I'm happy with #1 as well! New patch in attachment. OK to apply? Thanks, Jerome --p4qYPpj5QlsIQJ0K Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="2017-01-31-case-sensitive-command.diff" Content-length: 1825 commit d73d94c6d55e8cca5a38551207f65dfa2e47d054 Author: Jerome Guitton Date: Fri Jan 27 17:06:32 2017 +0100 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. diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 436a7ed..155d6d1 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1378,19 +1378,6 @@ lookup_cmd_1 (const char **text, struct cmd_list_element *clist, nfound = 0; 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 (nfound == 0) return 0; @@ -1731,20 +1718,6 @@ lookup_cmd_composition (const char *text, nfound = 0; *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) { return 0; /* ambiguous */ --p4qYPpj5QlsIQJ0K--