[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp-friendly backtraces [was: Lispy backtraces]
From: |
Stefan Monnier |
Subject: |
Re: Lisp-friendly backtraces [was: Lispy backtraces] |
Date: |
Mon, 05 Dec 2016 08:20:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> + if (!NILP (nskip))
> + {
> + CHECK_NUMBER(nskip);
^^
Please put a space before every open paren.
> + EMACS_INT to_skip = XINT(nskip);
> + while (to_skip > 0 && backtrace_p (pdl)) {
> + to_skip--;
> + pdl = backtrace_next (pdl);
> + }
> + }
Why not use the same `base` arg as `backtrace-frame` instead of `nskip`?
> - defsubr (&Sbacktrace);
> + DEFSYM (QCdebug_on_exit, ":debug-on-exit");
> + defsubr (&Smapbacktrace);
You remove the defsubr of Sbacktrace, but you don't remove the
corresponding DEFUN.
> (defun backtrace ()
> "Print a trace of Lisp function calls currently active.
> Output stream used is value of `standard-output'."
> (mapbacktrace #'~/backtrace-1 1))
Have you tried it both byte-compiled and interpreted? Maybe this
function is just simple enough that the result is the same in both
cases, but in my experience, the stack is sufficiently different in the
two cases that a constant nskip doesn't cut it (hence the use of `base`
in backtrace-frame).
Stefan
- Re: bug#24514: 24.5; Lispy backtraces, Clément Pit--Claudel, 2016/12/01
- Re: bug#24514: 24.5; Lispy backtraces, Stefan Monnier, 2016/12/01
- Re: bug#24514: 24.5; Lispy backtraces, Clément Pit--Claudel, 2016/12/03
- Re: bug#24514: 24.5; Lispy backtraces, Eli Zaretskii, 2016/12/04
- Re: bug#24514: 24.5; Lispy backtraces, Clément Pit--Claudel, 2016/12/04
- Re: bug#24514: 24.5; Lispy backtraces, Eli Zaretskii, 2016/12/04
- Re: bug#24514: 24.5; Lispy backtraces, Clément Pit--Claudel, 2016/12/04
- Re: bug#24514: 24.5; Lispy backtraces, Eli Zaretskii, 2016/12/04
- Lisp-friendly backtraces [was: Lispy backtraces], Clément Pit--Claudel, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces],
Stefan Monnier <=
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Clément Pit--Claudel, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Stefan Monnier, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Clément Pit--Claudel, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Eli Zaretskii, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Eli Zaretskii, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Clément Pit--Claudel, 2016/12/05
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Eli Zaretskii, 2016/12/06
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Clément Pit--Claudel, 2016/12/07
- Re: Lisp-friendly backtraces [was: Lispy backtraces], Clément Pit--Claudel, 2016/12/12