From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eeCVMs2mPGARHAAAWB0awg (envelope-from ) for ; Mon, 01 Mar 2021 03:33:17 -0500 Received: by simark.ca (Postfix, from userid 112) id C14EC1EF78; Mon, 1 Mar 2021 03:33:17 -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 2243B1E54D for ; Mon, 1 Mar 2021 03:33:16 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3596B3890415; Mon, 1 Mar 2021 08:33:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3596B3890415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614587595; bh=meZMWO+IFzV51usmvvftU2GBhgEwXT632fl9lR8TbLU=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FvgYpFl2gkcmfD6acVR3C8iijb2M6eaAg/WSwsGnXssJqaE4Q7HKk1JGZ+4FkGzeB DaFjGMfh38lKrA7srT8VnE3OHE4J/HOjEYbVQb5dkUOJaO+NTYClcbV+gJVCMnzR4/ vcB4nvkKPNfQkbipalpq3TmlxiBCPcyhjBrrIkt8= Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id B93843890415 for ; Mon, 1 Mar 2021 08:33:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B93843890415 Received: by mail-oi1-x22e.google.com with SMTP id w69so17286460oif.1 for ; Mon, 01 Mar 2021 00:33:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=meZMWO+IFzV51usmvvftU2GBhgEwXT632fl9lR8TbLU=; b=KTQP0T5q46k0bSzwOHB+RYCw6aOxFGLofzdaPF8xctd6V1O7mllUFxeJu3qtgB/WSq Vp7Qw19/JEgNxShrLnYlLdqDAEvigE4QCqVieF9rt0fNHhhMuqcrbj5tnVodMWSJnJ+p 1MpgdzbegBc0eK1Xh3tzL5SUmSgYpS0sWnPO38YeiOtXKbKFPLtZdWDe160jwKaoaiM2 WfiODts8L/nTz+WGPhDXh6JG3/+kuMRNAymMDUUT+59P1+0gdthMDqpyVyi7f0PfYt+F 95S6hFrYoJcnY1kFgthaX7XTrKPMfC2+iLKzf54uKkSEnly3K2ap96EQ6Vs+qBeUA5mX Z0fg== X-Gm-Message-State: AOAM533Ysx5vqkxuGTb1bPM+3XtjQrcsQ3FpJloVNQjrJJ/nySo+yM1w tvf3QUNTPASECdHAu9Tf/RAvshT91WBL1TMdI23rrC6P6fU= X-Google-Smtp-Source: ABdhPJylnL1kYkbAEto5YQIIJTaGEA1GOFg/xA7mmD9WWPluvAdjS8VaFijpiIJPmvQ5N+2O2zcU1h7X+25YIwZ1S+o= X-Received: by 2002:a05:6808:24d:: with SMTP id m13mr10531591oie.165.1614587590857; Mon, 01 Mar 2021 00:33:10 -0800 (PST) MIME-Version: 1.0 References: <20210108100706.96190-1-mbarisione@undo.io> <20210125112649.56362-1-mbarisione@undo.io> <4E618E8D-B469-4353-998F-A25051372D15@undo.io> In-Reply-To: <4E618E8D-B469-4353-998F-A25051372D15@undo.io> Date: Mon, 1 Mar 2021 08:32:34 +0000 Message-ID: Subject: Re: [PING 4] [PATCH v2 0/5] Add support for command renaming To: GDB patches mailing list Content-Type: text/plain; charset="UTF-8" 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: Marco Barisione via Gdb-patches Reply-To: Marco Barisione Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Ping 4. On Mon, 22 Feb 2021 at 08:28, Marco Barisione wrote: > > Ping. > > > On 15 Feb 2021, at 08:27, Marco Barisione wrote: > > > > Ping. > > > > On Mon, 8 Feb 2021 at 17:53, Marco Barisione wrote: > >> > >> Ping. > >> > >> On Mon, 25 Jan 2021 at 11:26, Marco Barisione wrote: > >>> This patch series adds support for command renaming to GDB. See the > >>> first email of this thread for details on the rationale and design. > >>> > >>> This second version fixes a few style issues, a bug in my code, and the > >>> way the prefix name for prefix commands is set. In particular: > >>> * Patch 1: add lookup_cmd_exact to simplify a common pattern > >>> Same as before except for style fixes. > >>> * Patch 2: prevent prefix commands from being hooks > >>> Same as before. > >>> * Patch 3: update the docs for add_cmd and do_add_cmd to match reality > >>> Same as before. > >>> * Patch 4: generate the prefix name for prefix commands on demand > >>> New patch which changes how the prefix name is set/generated. > >>> This simplifies a lot of existing code and the code from the next > >>> patch. Moreover, it fixes what I think could lead to a use after > >>> free (based on reading code, I didn't actually reproduce any crash). > >>> * Patch 5: Add support for renaming commands > >>> Updated version of what was before patch 4. > >>> This contains a few style fixes and makes delete_cmd_by_name use > >>> the lookup_cmd_exact function rather than find_cmd. > >>> > >>> Note that patches 1 to 4 are needed for the new feature but could be > >>> merged separately as they are improvements to the existing code. > >>> > >>> Marco Barisione (5): > >>> gdb: add lookup_cmd_exact to simplify a common pattern > >>> gdb: prevent prefix commands from being hooks > >>> gdb: update the docs for add_cmd and do_add_cmd to match reality > >>> gdb: generate the prefix name for prefix commands on demand > >>> gdb: Add support for renaming commands > >>> > >>> gdb/NEWS | 26 + > >>> gdb/ada-lang.c | 8 +- > >>> gdb/arm-tdep.c | 4 +- > >>> gdb/auto-load.c | 9 +- > >>> gdb/breakpoint.c | 20 +- > >>> gdb/bsd-kvm.c | 2 +- > >>> gdb/btrace.c | 9 +- > >>> gdb/cli/cli-cmds.c | 12 +- > >>> gdb/cli/cli-decode.c | 731 ++++++++++++++---- > >>> gdb/cli/cli-decode.h | 29 +- > >>> gdb/cli/cli-dump.c | 16 +- > >>> gdb/cli/cli-logging.c | 4 +- > >>> gdb/cli/cli-script.c | 375 +++++++-- > >>> gdb/cli/cli-setshow.c | 11 +- > >>> gdb/cli/cli-style.c | 11 +- > >>> gdb/cli/cli-style.h | 3 - > >>> gdb/command.h | 110 ++- > >>> gdb/compile/compile.c | 2 +- > >>> gdb/cp-support.c | 1 - > >>> gdb/dcache.c | 5 +- > >>> gdb/doc/gdb.texinfo | 55 +- > >>> gdb/doc/python.texi | 38 +- > >>> gdb/dwarf2/index-cache.c | 4 +- > >>> gdb/dwarf2/read.c | 4 +- > >>> gdb/f-lang.c | 4 +- > >>> gdb/frame.c | 4 +- > >>> gdb/gnu-nat.c | 12 +- > >>> gdb/go32-nat.c | 2 +- > >>> gdb/guile/guile.c | 9 +- > >>> gdb/guile/scm-cmd.c | 2 +- > >>> gdb/i386-tdep.c | 4 +- > >>> gdb/infcmd.c | 8 +- > >>> gdb/language.c | 4 +- > >>> gdb/macrocmd.c | 2 +- > >>> gdb/maint-test-options.c | 3 +- > >>> gdb/maint-test-settings.c | 2 - > >>> gdb/maint.c | 18 +- > >>> gdb/memattr.c | 4 +- > >>> gdb/mips-tdep.c | 6 +- > >>> gdb/printcmd.c | 2 +- > >>> gdb/probe.c | 3 +- > >>> gdb/python/py-cmd.c | 228 ++++-- > >>> gdb/python/python-internal.h | 1 + > >>> gdb/python/python.c | 6 +- > >>> gdb/ravenscar-thread.c | 4 +- > >>> gdb/record-btrace.c | 16 +- > >>> gdb/record-full.c | 6 +- > >>> gdb/record.c | 10 +- > >>> gdb/remote.c | 6 +- > >>> gdb/riscv-tdep.c | 8 +- > >>> gdb/rs6000-tdep.c | 4 +- > >>> gdb/ser-tcp.c | 4 +- > >>> gdb/serial.c | 4 +- > >>> gdb/sh-tdep.c | 4 +- > >>> gdb/skip.c | 2 +- > >>> gdb/sparc64-tdep.c | 2 +- > >>> gdb/stack.c | 8 +- > >>> gdb/symfile.c | 2 +- > >>> gdb/symtab.c | 3 +- > >>> gdb/target-descriptions.c | 6 +- > >>> gdb/target.c | 2 +- > >>> gdb/testsuite/gdb.base/command-renaming.exp | 571 ++++++++++++++ > >>> gdb/testsuite/gdb.base/define-prefix.exp | 24 + > >>> .../gdb.python/py-rename-existing.exp | 364 +++++++++ > >>> .../gdb.python/py-rename-existing.py | 46 ++ > >>> gdb/thread.c | 4 +- > >>> gdb/top.c | 10 +- > >>> gdb/tracepoint.c | 2 +- > >>> gdb/tui/tui-layout.c | 2 +- > >>> gdb/tui/tui-win.c | 8 +- > >>> gdb/typeprint.c | 6 +- > >>> gdb/unittests/command-def-selftests.c | 4 +- > >>> gdb/utils.c | 4 - > >>> gdb/valprint.c | 10 +- > >>> gdb/value.c | 2 +- > >>> gdb/windows-tdep.c | 2 +- > >>> 76 files changed, 2434 insertions(+), 529 deletions(-) > >>> create mode 100644 gdb/testsuite/gdb.base/command-renaming.exp > >>> create mode 100644 gdb/testsuite/gdb.python/py-rename-existing.exp > >>> create mode 100644 gdb/testsuite/gdb.python/py-rename-existing.py > >>> > >>> -- > >>> 2.28.0 > >>> > > -- > Marco Barisione >