public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Simon Marchi <simon.marchi@polymtl.ca>,
	Jerome Guitton <guitton@adacore.com>,
	gdb-patches@sourceware.org
Subject: Re: [RFA] candidates for ambiguous command in upper case
Date: Wed, 11 Jan 2017 17:26:00 -0000	[thread overview]
Message-ID: <20170111172550.GL9518@E107787-LIN> (raw)
In-Reply-To: <2c7e674b-e827-f433-cbaf-a3d1a20cba80@redhat.com>

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.

-- 
Yao (齐尧)

  parent reply	other threads:[~2017-01-11 17:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 14:25 Jerome Guitton
2017-01-10 15:07 ` Yao Qi
2017-01-10 15:19   ` Jerome Guitton
2017-01-10 15:28     ` Simon Marchi
2017-01-10 15:40       ` Jerome Guitton
2017-01-10 17:00       ` Pedro Alves
2017-01-11 15:37         ` Jerome Guitton
2017-01-11 17:26         ` Yao Qi [this message]
2017-01-11 17:35           ` Luis Machado
2017-01-11 20:24           ` Pedro Alves
2017-01-12 10:18             ` Jerome Guitton
2017-01-12 16:37               ` Pedro Alves
2017-01-16 16:32                 ` Jerome Guitton
2017-01-17  1:58                   ` Pedro Alves
2017-01-17 16:29                     ` Luis Machado
2017-01-17 16:35                       ` Pedro Alves
2017-01-17 16:51                         ` Luis Machado
2017-01-17 17:04                           ` Pedro Alves
2017-01-17 17:13                             ` Luis Machado
2017-01-31 14:39                       ` Jerome Guitton
2017-01-31 15:20                         ` Pedro Alves
2017-02-08 18:05                           ` Jerome Guitton
2017-07-24 21:17                             ` Simon Marchi
2017-07-24 21:48                               ` [PATCH] define_command: Don't convert command name to lower case Simon Marchi
2017-07-24 21:54                                 ` Simon Marchi
2017-08-28 21:20                                   ` Simon Marchi
2017-07-26 12:42                                 ` Jerome Guitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170111172550.GL9518@E107787-LIN \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=guitton@adacore.com \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).