[Top][All Lists]

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

Re: capturing backtraces

From: Stefan Monnier
Subject: Re: capturing backtraces
Date: Mon, 25 Aug 2014 10:57:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

 > (flet ((debug (&rest args)
 >          (setq nic-args args)))

Better bind the `debugger' variable.

> Wouldn't it be better to just grab the backtrace whenever an error
> occurs and put it in a global or push it on to a global list?

Depends what you mean by better: the normal representation of the
backtrace is transient (embedded in the C stack), so that would require
converting it to an Elisp list upon every call to Fsignal.

IOW, you'd have to pay for it all the time, even tho it's very rarely
used (as a percentage of the number of times Fsignal is called).

But we could probably arrange for something less hackish than rebinding
`debug'.  Maybe a new debugger-extra-data-function which would be called
by Fsignal and whose return value would be added data to the condition
that's being signaled (so you'd receive it in the `err' variable of your


reply via email to

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