From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29186 invoked by alias); 1 Nov 2019 09:14:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28736 invoked by uid 89); 1 Nov 2019 09:14:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Nov 2019 09:14:38 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQT0s-0002Zt-Hh; Fri, 01 Nov 2019 05:14:34 -0400 Received: from [176.228.60.248] (port=3287 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQT0r-0006XR-Ro; Fri, 01 Nov 2019 05:14:34 -0400 Date: Fri, 01 Nov 2019 09:14:00 -0000 Message-Id: <83h83om003.fsf@gnu.org> From: Eli Zaretskii To: Marco Barisione CC: gdb-patches@sourceware.org In-reply-to: <20191101085449.28493-1-mbarisione@undo.io> (message from Marco Barisione on Fri, 1 Nov 2019 08:54:49 +0000) Subject: Re: [PATCH v2] Add a way to preserve overridden GDB commands for later invocation References: <20191028133234.319-1-mbarisione@undo.io> <20191101085449.28493-1-mbarisione@undo.io> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00013.txt.bz2 > From: Marco Barisione > Date: Fri, 1 Nov 2019 08:54:49 +0000 > > 2019-11-01 Marco Barisione > > 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 > > * 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 > > * gdb.python/py-chain-invoke.exp: New file. > * gdb.python/py-chain-invoke.py: New test. Thanks, the documentation parts are OK.