[PATCH v2] Add a way to preserve overridden GDB commands for later invocation

Eli Zaretskii eliz@gnu.org
Fri Nov 1 09:14:00 GMT 2019


> From: Marco Barisione <mbarisione@undo.io>
> Date: Fri,  1 Nov 2019 08:54:49 +0000
> 
> 2019-11-01  Marco Barisione  <mbarisione@undo.io>
> 
> 	Add support for preserving the functionalities from overridden
> 	commands.
> 	* cli/cli-decode.c (delete_cmd): Rename to remove_cmd.
> 	(remove_cmd): Allow commands to be preserved after overriding
> 	them.
> 	(do_add_cmd): Support the preservation of overridden commands.
> 	(add_alias_cmd): Use delete_cmd instead of remove_cmd and update
> 	the assertions.
> 	* cli/cli-decode.h (struct cmd_list_element): Add
> 	preserve_when_overridden and preserved_overridden_cmd.
> 	* cli/cli-script.c (do_define_command): Make default commands
> 	be preserved by default.
> 	* python/py-cmd.c (cmdpy_invoke_overridden): Add an
> 	invoke_overridden command method to gdb.Command.
> 	(cmdpy_init): Add a preserve_when_overridden argument to
> 	gdb.Command.__init__.
> 	* NEWS: Document the addition of gdb.Command.invoke_overridden
> 	and the new preserve_when_overridden argument for
> 	gdb.Command.__init__.
> 
> gdb/doc/ChangeLog:
> 
> 2019-11-01  Marco Barisione  <mbarisione@undo.io>
> 
> 	* python.texi (Commands In Python): Document
> 	gdb.Command.invoke_overridden and the new
> 	preserve_when_overridden argument for gdb.Command.__init__.
> 
> gdb/testsuite/ChangeLog:
> 
> 2019-11-01  Marco Barisione  <mbarisione@undo.io>
> 
> 	* gdb.python/py-chain-invoke.exp: New file.
> 	* gdb.python/py-chain-invoke.py: New test.

Thanks, the documentation parts are OK.



More information about the Gdb-patches mailing list