binutils-gdb/gdb/cli
Jerome Guitton 604c4576fd Command abbreviation in define
When defining a new macro, "command" is not recognized as an alias for
"commands":

 (gdb) define breakmain
 Type commands for definition of "breakmain".
 End with a line saying just "end".
 >break main
 >command
 >echo "IN MAIN\n"
 >end
 (gdb)

There is a special case for while-stepping, where 'ws' and 'stepping' are
recognized explicitely. Instead of adding more special cases, this change
uses cli-decode.

gdb/ChangeLog:
	* cli/cli-decode.c (find_command_name_length): Make it extern.
	* cli/cli-decode.h (find_command_name_length): Declare.
	* cli/cli-script.c (command_name_equals, line_first_arg):
	New functions.
	(process_next_line): Use cli-decode to parse command names.
	(build_command_line): Make args a constant pointer.

gdb/testsuite/ChangeLog:

	* gdb.base/define.exp: Add test for command abbreviations
	in define.
2017-02-08 19:03:25 +01:00
..
cli-cmds.c Remove unused file_string parameter in gdb_disassembly 2017-02-01 22:54:35 -05:00
cli-cmds.h
cli-decode.c Command abbreviation in define 2017-02-08 19:03:25 +01:00
cli-decode.h Command abbreviation in define 2017-02-08 19:03:25 +01:00
cli-dump.c Use class to manage BFD reference counts 2017-01-10 19:14:10 -07: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 Command abbreviation in define 2017-02-08 19:03:25 +01:00
cli-script.h
cli-setshow.c Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy 2017-02-02 11:11:47 +00:00
cli-setshow.h
cli-utils.c
cli-utils.h