Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jerome Guitton <guitton@adacore.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: Pedro Alves <palves@redhat.com>, Yao Qi <qiyaoltc@gmail.com>,
	Simon Marchi <simon.marchi@polymtl.ca>,
	gdb-patches@sourceware.org
Subject: Re: [RFA] candidates for ambiguous command in upper case
Date: Tue, 31 Jan 2017 14:39:00 -0000	[thread overview]
Message-ID: <20170131143941.GB22056@adacore.com> (raw)
In-Reply-To: <6872438c-e93a-77e8-79a3-c8e1f05aa283@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

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

[-- Attachment #2: 2017-01-31-case-sensitive-command.diff --]
[-- Type: text/x-diff, Size: 1825 bytes --]

commit d73d94c6d55e8cca5a38551207f65dfa2e47d054
Author: Jerome Guitton <guitton@adacore.com>
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 */

  parent reply	other threads:[~2017-01-31 14:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1484058324-5368-1-git-send-email-guitton@adacore.com>
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
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 [this message]
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=20170131143941.GB22056@adacore.com \
    --to=guitton@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=palves@redhat.com \
    --cc=qiyaoltc@gmail.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