emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Early backtrace.


From: Alan Mackenzie
Subject: Re: Early backtrace.
Date: Tue, 11 Jan 2022 11:36:32 +0000

Hello, Stefan.

On Mon, Jan 10, 2022 at 16:54:16 -0500, Stefan Monnier wrote:
> > So I came up with the following, which has no Lisp dependencies.  That
> > is, absolutely none.  I have used it as the first Lisp file loaded,
> > immediately before byte-run.el.

> I have a similar hack here for the same reason ;-)
> So a +1 from me (tho I'd recommend using the `debugger-` namespace
> rather than `early-`).

Thanks!  Maybe `debug-early' and `backtrace-early' would do for the two
functions?  There isn't really a debugger- prefix that early in the
bootstrap.

> > So, how about including this file in Emacs, amending eval.c to use it if
> > backtrace.el isn't yet avaiable?  Comments and criticism are welcome.

> I don't see any need for a change to `eval.c`.  Just put the

>     (setq debugger #'early-debug)

> and

>     (setq debugger #'debug)

> at the appropriate places inside `loadup.el`.

No, inside signal_or_quit, Vdebugger gets bound to Qdebug, so as to
bypass the setting made in ERT.  Also it is filtered out by checking for
not being in dump or bootstrap.  Instead, we should check Ffboundp
(Qdebug) || Ffboundp (Qdebug_early).  Not difficult to do.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]