[binutils-gdb/gdb-8.0-branch] define_command: Don't convert command name to lower case

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Mon Aug 28 22:06:00 GMT 2017


*** TEST RESULTS FOR COMMIT 95eeca3bccb6121c201183e21cb5fc39a6b711a2 ***

Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: gdb-8.0-branch
Commit: 95eeca3bccb6121c201183e21cb5fc39a6b711a2

define_command: Don't convert command name to lower case

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.

gdb/ChangeLog:

	* cli/cli-script.c (define_command): Don't convert command name
	to lower case.

gdb/testsuite/ChangeLog:

	* gdb.base/commands.exp (user_defined_command_case_sensitivity):
	New proc, call it from toplevel.



More information about the Gdb-testers mailing list