This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] define_command: Don't convert command name to lower case


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]