From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3QFfJFs0+F+wKAAAWB0awg (envelope-from ) for ; Fri, 08 Jan 2021 05:30:51 -0500 Received: by simark.ca (Postfix, from userid 112) id 841031E99A; Fri, 8 Jan 2021 05:30:51 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CCE341E940; Fri, 8 Jan 2021 05:30:50 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2EA6F3973026; Fri, 8 Jan 2021 10:30:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EA6F3973026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610101850; bh=7g2d150/vikaDtSb5/LZkrX/QD46c0h2dNM51ZfjOGE=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=LG3DuJRdbnfdeR9cbqNzfkdOPeygTDz+go20Lh9ED5B9Ni2J0k20UApcVMzU/OLRK KRaK+KaNkQhj0nmihVvmc44c8q1oYFvZw3P5yBko24pjWw+7DUp3jm0++Fxd7/3c56 i1LRs8JkzAGxj8c7rCifOoHwv1heKJ13F1DXQfWs= 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> To: Marco Barisione 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-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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > 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.