binutils-gdb/gdb/cli
Simon Marchi fd437cbc43 define_command: Don't convert command name to lower case
Commit

  Command names: make them case sensitive
  3d7b173c29

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.
2017-08-28 23:05:04 +02:00
..
cli-cmds.c List actual code around more than one location 2017-08-22 15:32:19 +01:00
cli-cmds.h Change return type of find_and_open_script 2017-08-03 07:58:53 -06:00
cli-decode.c Introduce class completion_tracker & rewrite completion<->readline interaction 2017-07-17 14:45:59 +01:00
cli-decode.h Clean up "completer_handle_brkchars" callback handling 2017-07-17 12:05:03 +01:00
cli-dump.c Use gdb::unique_xmalloc_ptr when calling tilde_expand 2017-08-05 15:52:49 -06:00
cli-interp.c C++-fy struct interp/cli_interp/tui_interp/mi_interp 2017-02-03 16:30:04 +00:00
cli-interp.h C++-fy struct interp/cli_interp/tui_interp/mi_interp 2017-02-03 16:30:04 +00:00
cli-logging.c Move "tee" building down to interpreter::set_logging_proc 2017-02-02 22:00:43 +00:00
cli-script.c define_command: Don't convert command name to lower case 2017-08-28 23:05:04 +02:00
cli-script.h Introduce command_line_up 2017-04-12 11:16:17 -06:00
cli-setshow.c Use ui_out_emit_tuple 2017-04-22 09:46:58 -06:00
cli-setshow.h update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
cli-utils.c -Wwrite-strings: Some constification in gdb/breakpoint.c 2017-04-05 19:21:36 +01:00
cli-utils.h -Wwrite-strings: Some constification in gdb/breakpoint.c 2017-04-05 19:21:36 +01:00