From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#59213: Emacs 29: Edebug fails to instrument a parameter whose name begins with _ Date: Sat, 11 Feb 2023 11:17:24 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15653"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59213-done@debbugs.gnu.org, Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 11 12:18:33 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQntp-0003wz-1Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Feb 2023 12:18:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQntO-0000IR-IP; Sat, 11 Feb 2023 06:18:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQntL-0000I3-Ef for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2023 06:18:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQntL-0005Mc-3j for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2023 06:18:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQntK-00009l-IB for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2023 06:18:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Feb 2023 11:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 59213 X-GNU-PR-Package: emacs Mail-Followup-To: 59213@debbugs.gnu.org, acm@muc.de, acm@muc.de Original-Received: via spool by 59213-done@debbugs.gnu.org id=D59213.1676114257558 (code D ref 59213); Sat, 11 Feb 2023 11:18:02 +0000 Original-Received: (at 59213-done) by debbugs.gnu.org; 11 Feb 2023 11:17:37 +0000 Original-Received: from localhost ([127.0.0.1]:39106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQnsu-00008v-OV for submit@debbugs.gnu.org; Sat, 11 Feb 2023 06:17:37 -0500 Original-Received: from mx3.muc.de ([193.149.48.5]:34895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQnsp-00008e-PS for 59213-done@debbugs.gnu.org; Sat, 11 Feb 2023 06:17:35 -0500 Original-Received: (qmail 5741 invoked by uid 3782); 11 Feb 2023 12:17:25 +0100 Original-Received: from acm.muc.de (p4fe15206.dip0.t-ipconnect.de [79.225.82.6]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 11 Feb 2023 12:17:25 +0100 Original-Received: (qmail 11041 invoked by uid 1000); 11 Feb 2023 11:17:24 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255329 Archived-At: Hello, Stefan. On Fri, Feb 10, 2023 at 17:05:32 -0500, Stefan Monnier wrote: [ .... ] > > What do you think? > I think that's good enough for `emacs-29`, yes. I've committed the fix (with modifications) to master, as requested by Eli, and I'm closing the bug with this post. > I don't like the use of a dynbound variable to control this, but it's > not clear how to do better. One thing that occurred to me right now is > that we could mark the Edebug closures themselves, e.g. by replacing > (function (lambda () ,@forms)) > with > (function (lambda () :closure-dont-trim-context ,@forms)) > and then have `cconv-make-interpreted-closure` look for this > tell-tale sign. Interesting. Isn't there a good chance this would foul up programs which analyse the structure of a closure? (A bit like testcover-analyze-coverage analyses the calling structure of edebug-enter). > A few minor comments about your patch below. [ .... ] > Hmm... any reason why we can't just replace > (if (null lexvars) > with > (if (or cconv-dont-trim-unused-variables (null lexvars)) > and be done with it? No, no reason at all. I think I was concerned to preserve the macro expansion, but seeing as how that wouldn't even be in the uninstrumented form, this is clearly not a valid concern. So I modified the patch to do that before committing it. Thanks! > Stefan -- Alan Mackenzie (Nuremberg, Germany).