[Top][All Lists]

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

Re: Need to get Lisp backtrace when error is in C code

From: Robert Weiner
Subject: Re: Need to get Lisp backtrace when error is in C code
Date: Tue, 3 Oct 2017 14:02:28 -0400

On Tue, Oct 3, 2017 at 1:50 PM, Stefan Monnier <address@hidden> wrote:
> Personally, for errors like this, I would typically include the function
> name reference so that the location is obvious and users without debug
> symbols in their Emacs could still report a more useful error.
> Is this doable?  A good idea?

I think it's desirable, yes.  The problem is how to do it.

Even just showing the Lisp backtrace by itself with some note that
the error was raised in C code would narrow down the location tremendously
I think.

I guess we could try to replace `Ferror` with a C macro that pushes some
caller-info onto the Lisp backtrace before signaling the error (a bit
like we currently push some pseudo-function onto that stack trace
during garbage collection and redisplay).  It won't handle the cases
where we call `Fsignal` instead, nor the cases where we call some
generic C function which then calls Ferror, so to make it really work
well, it'll require more manual work to place the caller-info at the
"right" spot.

​A full solution would be a big win.


reply via email to

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