From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116191 invoked by alias); 11 Jan 2017 17:35:04 -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 116176 invoked by uid 89); 11 Jan 2017 17:35:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=U*gdb, exec-fil, UD:aux.coff, UD:coff X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Jan 2017 17:34:53 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cRMnS-0003u5-DR from Luis_Gustavo@mentor.com ; Wed, 11 Jan 2017 09:34:50 -0800 Received: from [172.30.6.249] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 11 Jan 2017 09:34:46 -0800 Subject: Re: [RFA] candidates for ambiguous command in upper case References: <1484058324-5368-1-git-send-email-guitton@adacore.com> <20170110150731.GH9518@E107787-LIN> <20170110151944.GD27546@adacore.com> <2c7e674b-e827-f433-cbaf-a3d1a20cba80@redhat.com> <20170111172550.GL9518@E107787-LIN> To: Yao Qi , Pedro Alves CC: Simon Marchi , Jerome Guitton , Reply-To: Luis Machado From: Luis Machado Message-ID: <7048f2b6-1816-a4e9-e78e-4c9743271c03@codesourcery.com> Date: Wed, 11 Jan 2017 17:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170111172550.GL9518@E107787-LIN> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00194.txt.bz2 On 01/11/2017 11:25 AM, Yao Qi wrote: > 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 > 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. > I think it makes for a more coherent command-handling environment. So load would be the same as LOAD, Load, LoAd, lOaD. I can't think of a scenario where differentiating uppercase/lowercase commands in GDB's CLI would make a difference. Though i've noticed that MI commands are case-sensitive, which is incoherent. We ought to fix that too.