GNU bug report logs - #16184
24.3.50; edebug and eval-when-compiler don't work together

Previous Next

Package: emacs;

Reported by: Anders Lindgren <andlind <at> gmail.com>

Date: Wed, 18 Dec 2013 10:59:01 UTC

Severity: normal

Found in version 24.3.50

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: Alan Mackenzie <acm <at> muc.de>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: David Bremner <david <at> tethera.net>, Katsumi Yamaoka <yamaoka <at> jpl.org>, 16184 <at> debbugs.gnu.org, Anders Lindgren <andlind <at> gmail.com>, Benaiah Mischenko <benaiah <at> mischenko.com>
Subject: bug#16184: 24.3.50; edebug and eval-when-compiler don't work together
Date: Sat, 31 Dec 2016 11:18:52 +0000
Hello, Gemini.

On Fri, Dec 30, 2016 at 03:27:37PM -0800, Gemini Lasswell wrote:
> Alan Mackenzie <acm <at> muc.de> writes:

> > .  During this instrumentation, the inside of the cc-eval-when-compile
> > form gets run, in particular, the (edebug-before 2).  At this stage,
> > since edebug-enter hasn't been run at all, edebug-offset-indices is still
> > nil.  The (edebug-before 2) thus attempts (setcar nil 2), which throws
> > the error.

> I haven't able to reproduce the bug with cc-eval-when-compile,
> just eval-and-compile. But the thing that is supposed to make Edebug
> wrap a form in edebug-enter is the use of def-form or def-body in the
> Edebug spec.

This is extremely poorly documented, even in the source code, if it is
documented at all.  I don't really understand the documentation of the
edebug spec in general.

> It works for eval-when-compile which has the Edebug spec (&rest
> def-form). The body of eval-and-compile doesn't get wrapped because
> its Edebug spec is t, so the bug happens there.

Ah!  I think I'm beginning to understand all this.  Looking at the
source code, it seems a def-form or def-body causes the form to be
wrapping by edebug-enter, but not much else does.

> cc-eval-when-compile has the same Edebug spec as eval-when-compile, so
> its body should get wrapped by edebug-enter. If that's not happening in
> your Emacs, it's a bug in Edebug which is different from the
> eval-and-compile Edebug spec bug.

I think you've persuaded me that my fix to this bug was wrong.  Rather
than adapting initialisations to cope with edebug-enter not being
called, I should have diagnosed _why_ an edebug-enter is not being
generated during instrumentation of a cc-eval-when-compile form.

I'm working on this now.  Thank you indeed for drawing my attention to
these edebug specs.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 8 years and 236 days ago.

Previous Next


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