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: [RFA] candidates for ambiguous command in upper case


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


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