From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5Bj0L1wafF+ZGwAAWB0awg (envelope-from ) for ; Tue, 06 Oct 2020 03:18:52 -0400 Received: by simark.ca (Postfix, from userid 112) id ACDC91EE0F; Tue, 6 Oct 2020 03:18:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 0AB301E4B5 for ; Tue, 6 Oct 2020 03:18:51 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 062353857C4E; Tue, 6 Oct 2020 07:18:50 +0000 (GMT) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id AFC153857C4E for ; Tue, 6 Oct 2020 07:18:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AFC153857C4E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=undo.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mbarisione@undo.io Received: by mail-wr1-x444.google.com with SMTP id e18so6287298wrw.9 for ; Tue, 06 Oct 2020 00:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undo-io.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rzTzaIkX3+VCyd2kzBtrYY2Cad20bylfhk5qq0H69oY=; b=OEakmvJgBUfyJ46slSRJ5p7lDkDHswcSBg4mGFWYgDvhupVkuPscImBzJxCK5tHxpD O2Xj7CiiQjNsOzRDghw5kjX+Q1F86hav0XqXusBulyhXw6O0jYQs12/T2uycj+9UQnCq t7UHi5JhGOvgHeeNwMLt3WRrluiqhwUaqxn126Aqtu7p5hsBTvEGl4WBZO/phlT6MzzS rAcQlCcJc0POjo97Uy32lP6iT27iUf0+am17ujp5cW1pAMw/pQYVXAuGoqYFLml9sNx/ EiJ1T9yybvMjTBc3YLjH308Nt0iAi7F7Mr25Uqmu7RRvZIcRgik9Rj7CEb4zN0pAmLJ7 ul+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rzTzaIkX3+VCyd2kzBtrYY2Cad20bylfhk5qq0H69oY=; b=sOIXAg5S/HH8q3mJ1yyBQhPyLhQUzrrfW85bblUWbloasFLHYEUOwg0kU+yfTvLvBP /G1x9zWMMQUKBaybqjc8jUHp4YzY2h59XyVOHaEaq+C2DA8xEQvCmyhuZ3gLzjXQB4mx EPw+/qPVJLfZO/IAhl+zXIerLru7I6DC9bWjXpagi6z2BkiCuvlrcIj4J0Y1tswOpIL+ aBM3TjYPHxWDB1nhapPH4EGDvGiqp+GuKv+dTjP67Vxv4nmeRjUYJS7X0RdmnJp5Wfuz fvgYic/ABNwqpDk4EzsJe+qLsxA8nZN9gMSf4GqghJv+dHyBg6WveCU+QC6WTtGAm6nj 6Fyw== X-Gm-Message-State: AOAM531q9rC45EZdUp+se0jqpvjG1fpNb1u49oasRh/c0PAIdsODZ47s 6Iz8CI2ZQ4uy43J0aG+QmFRCxA== X-Google-Smtp-Source: ABdhPJx/jKj+2fIlg5MzmK4r/GXDmTlF4J31p1kRGpegA5Zg/VtpGxwKoOkyl7zUTpogiu9pjEMdLA== X-Received: by 2002:adf:8484:: with SMTP id 4mr3384725wrg.334.1601968724923; Tue, 06 Oct 2020 00:18:44 -0700 (PDT) Received: from [192.168.0.107] (cpc159317-cmbg20-2-0-cust117.5-4.cable.virginm.net. [81.111.29.118]) by smtp.gmail.com with ESMTPSA id i14sm2710038wml.24.2020.10.06.00.18.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2020 00:18:44 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: [PATCH 2/2] Add a way to preserve redefined GDB commands for later invocation From: Marco Barisione In-Reply-To: <20201005181100.GI605036@embecosm.com> Date: Tue, 6 Oct 2020 08:18:42 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <69A8A132-78BB-490F-B8A6-C357BD08A1DF@undo.io> References: <20200914093925.5442-1-mbarisione@undo.io> <20200914093925.5442-3-mbarisione@undo.io> <20201005102441.GG605036@embecosm.com> <27432854-8CFD-47A2-BB9C-62B8D921E1EA@undo.io> <20201005181100.GI605036@embecosm.com> To: Andrew Burgess X-Mailer: Apple Mail (2.3445.104.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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 5 Oct 2020, at 19:11, Andrew Burgess = wrote: >>> I also wonder how we might handle _really_ redefining a command now >>> that past commands hang around. >>>=20 >>> When writing the above cmd_1 example the first thing I did was open >>> GDB and try to write the commands at the CLI. I made a typo when >>> writing the second version of cmd_1. So now I'm stuck with a chain: >>>=20 >>> working level 0 cmd_1 --> broken level 1 cmd_1 >>>=20 >>> Sure I can write a level 2 version that knows to skip over the = broken >>> level 1, but it might be nice if there was a flag somewhere that I >>> could pass to say, no, really replace the last version of this = command >>> please. >>=20 >> Is this really what a user would want? Or would they want the ability >> to delete commands? >=20 > Deleting too might be useful, but I think the case I gave is not > unique to me, I tried writing a command, I got it slightly wrong. > Sure I can delete and start again, but being able to just do: >=20 > (gdb) define --redefine cmd_1 > ... >=20 > would be nice. I think I=E2=80=99m onboard with all your suggestions, but I=E2=80=99m = not 100% sure about the details. What happens if you "set confirm off"? That is, what = should be the default answer? Do we need "define --override" and "define --replace"? What happens if = the command is not already previously defined? --=20 Marco Barisione