This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] candidates for ambiguous command in upper case
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Jerome Guitton <guitton at adacore dot com>, Pedro Alves <palves at redhat dot com>
- Cc: Luis Machado <lgustavo at codesourcery dot com>, Yao Qi <qiyaoltc at gmail dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>, <gdb-patches at sourceware dot org>
- Date: Mon, 24 Jul 2017 23:16:42 +0200
- Subject: Re: [RFA] candidates for ambiguous command in upper case
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <2c7e674b-e827-f433-cbaf-a3d1a20cba80@redhat.com> <20170111172550.GL9518@E107787-LIN> <b65e1ded-a53b-74d1-169b-806da8fc321d@redhat.com> <20170112101854.GL27546@adacore.com> <85ecb095-a990-6f15-4fe9-5addffb3a5d0@redhat.com> <20170116163210.GG27546@adacore.com> <b8bc5132-1923-8364-160a-aced2723b840@redhat.com> <6872438c-e93a-77e8-79a3-c8e1f05aa283@codesourcery.com> <20170131143941.GB22056@adacore.com> <fccf1daa-e0be-fcf4-5ab1-fd1a922b93f8@redhat.com> <20170208180510.GC22056@adacore.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-02-08 07:05 PM, Jerome Guitton wrote:
> Pedro Alves (palves@redhat.com):
>
>> LGTM.
>
> This one has been committed as well.
>
> Thanks again,
> Jerome
>
Hi all,
This patch indirectly causes a regression with user-defined commands that include
capital letters.
define_command converts the command name to lower case, assuming that the command
lookup mechanism is case insensitive:
/* If the rest of the commands will be case insensitive, this one
should behave in the same manner. */
for (tem = comname; *tem; tem++)
if (isupper (*tem))
*tem = tolower (*tem);
Therefore, ff a user defines command Foo, it will be transformed to foo, and only
accessible by typing "foo". Since the command system is now case sensitive, I think
we should remove that conversion. The command Foo will then only be accessible with
"Foo", not "foo" nor "FOO".
Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=21827
WDYT?
Simon