This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] define_command: Don't convert command name to lower case
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: <guitton at adacore dot com>
- Date: Mon, 24 Jul 2017 23:54:47 +0200
- Subject: Re: [PATCH] define_command: Don't convert command name to lower case
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <10ded574-4f1e-728c-8205-bcb0e31d0377@ericsson.com> <1500932879-11652-1-git-send-email-simon.marchi@ericsson.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-07-24 11:47 PM, Simon Marchi wrote:
> I think this won't be too controversial, so I went ahead and made a patch for
> it.
>
> Commit
>
> Command names: make them case sensitive
> 3d7b173c29900879c9a5958dd6029fd36666e57c
>
> made command name lookup case sensitive. However, define_command, used
> when creating a user-defined command, converts the command name to
> lowercase, assuming that the command name lookup works in a case
> insensitive way. This causes user-defined commands with capital letters
> in their name to only be callable with a lowercase version:
>
> (gdb) define Foo
> Type commands for definition of "Foo".
> End with a line saying just "end".
> >print 1
> >end
> (gdb) Foo
> Undefined command: "Foo". Try "help".
> (gdb) foo
> $1 = 1
>
> This patch removes that conversion to lowercase, so that the user can
> call the command with the same name they provided.
I forgot to mention but this would be a candidate for the 8.0 branch as well,
since it's a regression.
Simon