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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 59213 <at> debbugs.gnu.org
Subject: bug#59213: Emacs 29: Edebug fails to instrument a parameter whose name begins with _
Date: Mon, 14 Nov 2022 07:56:34 -0500
> More precisely, with this defun:
>
>     (defun add (a b c)
>       (+ a b))
>
> , instrument it for edebug.  Call M-: (add 1 2 6).
>
> The source code with active edebug now looks like:
>
>     (defun add (a b c)
>     =>(+ a b))
>
> ..  `e a` now returns 1.  `e b` returns 2.  `e c` gives the error message:
>
>     Error: Symbol's value as variable is void: c
>
> ..  I repeat, this is a bug.  It should have returned 6.

[ Well, GDB does the same and claims it's not a bug, instead it says the
  variable has been optimized away or something to that effect.  ]

Agreed.  Edebug should be careful to prevent unused vars from being
optimized away.  I'll try and come up with a good patch for that,


        Stefan





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.