From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id C60193973033 for ; Fri, 8 Jan 2021 10:30:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C60193973033 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53027) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxp2c-0005yM-9Y; Fri, 08 Jan 2021 05:30:46 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2610 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kxp2a-0003Gj-PI; Fri, 08 Jan 2021 05:30:46 -0500 Date: Fri, 08 Jan 2021 12:30:47 +0200 Message-Id: <83ft3bk9ew.fsf@gnu.org> From: Eli Zaretskii To: Marco Barisione Cc: gdb-patches@sourceware.org In-Reply-To: <20210108100706.96190-5-mbarisione@undo.io> (message from Marco Barisione via Gdb-patches on Fri, 8 Jan 2021 10:07:06 +0000) Subject: Re: [PATCH 4/4] gdb: Add support for renaming commands References: <20210108100706.96190-1-mbarisione@undo.io> <20210108100706.96190-5-mbarisione@undo.io> X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2021 10:30:48 -0000 > Date: Fri, 8 Jan 2021 10:07:06 +0000 > From: Marco Barisione via Gdb-patches > > gdb/ChangeLog: > > * NEWS: Add items for the new rename command, the new > -rename-existing-to option for define and the new > rename_existing_to argument for gdb.Command.__init__. > * cli/cli-decode.c (delete_cmd): Rename to disconnect_cmd. > (disconnect_cmd): Disconnect a command from other commands and > lists rather than deleting the command. > (delete_cmd_by_name): Add. > (update_prefix_links): Add. > (update_cmd): Add. > (do_add_cmd): Add ability to rename existing commands rather > than redefining them. > (add_cmd): Ditto. > (add_prefix_cmd): Ditto. > (add_alias_cmd): Update to use disconnect_cmd. > (break_cmd_relationships): Add. > (rename_hook): Add. > (user_defined_command): Move from cli/cli-script.c. > (rename_cmd): Add. > * cli/cli-decode.h (struct cmd_list_element): Call the destroyer > function from the destructor and always free the prefixname. > * cli/cli-script.c (do_define_command): Add ability to rename > existing commands rather than redefining them. > (user_defined_command): Move to cli/cli-decode.c > (check_command_redefinition): Add. > (enum cmd_hook_type): Move from do_define_command to the global > scope. > (get_hook_type): Add. > (HOOK_STRING): Make a variable in get_hook_type. > (HOOK_LEN): Ditto. > (HOOK_POST_STRING): Ditto. > (HOOK_POST_LEN): Ditto. > (struct define_cmd_opts): Add. > (make_define_cmd_options_def_group): Add. > (define_command): Add -rename-existing-to option. > (do_rename_command): Add. > (rename_command): Add. > (_initialize_cli_script): Add option parsing for the define > command and add the rename command. > * command.h (add_cmd): Add ability to rename existing commands > rather than redefining them. > (add_prefix_cmd): Ditto. > (rename_cmd): Add. > (user_defined_command): Add declaration of previously static > function. > * python/py-cmd.c (cmdpy_init): Add rename_existing_to argument. > > gdb/doc/ChangeLog: > > * gdb.texinfo: Document the new rename command and the new > -rename-existing-to option for define. > * python.texi: Document the new rename_existing_to argument for > gdb.Command.__init__. > > gdb/testsuite/ChangeLog: > > * gdb.base/command-renaming.exp: New test. > * gdb.python/py-rename-existing.exp: New test. > * gdb.python/py-rename-existing.py: New test. Thanks, the documentation parts are OK.