GNU bug report logs - #59213
Emacs 29: Edebug fails to instrument a parameter whose name begins with _

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sat, 12 Nov 2022 09:37:01 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #37 received at 59213-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 59213-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#59213: Emacs 29: Edebug fails to instrument a parameter
 whose name begins with _
Date: Sat, 11 Feb 2023 11:17:24 +0000
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).




This bug report was last modified 2 years and 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.