From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130785 invoked by alias); 11 Jan 2017 17:26:14 -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 130763 invoked by uid 89); 11 Jan 2017 17:26:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:AES128-SHA, U*gdb, =e5=b0=a7?= X-HELO: mail-wj0-f194.google.com Received: from mail-wj0-f194.google.com (HELO mail-wj0-f194.google.com) (209.85.210.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Jan 2017 17:26:04 +0000 Received: by mail-wj0-f194.google.com with SMTP id ey1so12604275wjd.2 for ; Wed, 11 Jan 2017 09:26:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pvWL0Afafolm9yCz2TX/GdjaJcvajVIDkxVpGnTMYcA=; b=PJmKVjqBDdS9JpTgONiHDKSFia3xsXQdgyeeC4tWuqx3pYYt3NfMyiF1kJBNBwNbiR 8tlFByk93W+eFNi/3DbEQG7Dj2FC2aDqGU92pkMbayXzCNu1PttQU2Sk+Pgs9w2+DgXU ThuXw8oQJ0z2WlT34NoX2Oy7el/bG5IYh/DIm5V53XsD5bfsebsh+yVG+Jo6s6zrAIB6 +rXdIhI5tijiTJxFhKZgRAGI2oqeVBag5uVyNGKWjE1gB70tA7dsQjiiWxfkXucohwBv jsX0AbJx3KLqrgRx5Qx9DE/obcbkF6xWOIt8wdMbJPaI9Js+qM5xQSSAIENSq45qU+Sa 8zGg== X-Gm-Message-State: AIkVDXKguUVQ0VQjSntj16WkNio/tpZHryON3/eHrBxwnVLDv+frJRsJNcEgK3GhRSdabQ== X-Received: by 10.194.189.37 with SMTP id gf5mr6954111wjc.83.1484155561763; Wed, 11 Jan 2017 09:26:01 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id a186sm9959013wmh.1.2017.01.11.09.25.59 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 11 Jan 2017 09:26:01 -0800 (PST) Date: Wed, 11 Jan 2017 17:26:00 -0000 From: Yao Qi To: Pedro Alves Cc: Simon Marchi , Jerome Guitton , gdb-patches@sourceware.org Subject: Re: [RFA] candidates for ambiguous command in upper case Message-ID: <20170111172550.GL9518@E107787-LIN> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2c7e674b-e827-f433-cbaf-a3d1a20cba80@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00193.txt.bz2 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. -- Yao (齐尧)