bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10025: 24.0.91; Lisp debugger not working right


From: Stefan Monnier
Subject: bug#10025: 24.0.91; Lisp debugger not working right
Date: Thu, 06 Dec 2012 23:35:19 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Moreover, it seems not to be so hard to fix.  In the defun of `debug', I
> replaced this:

>             (when (eq (car debugger-args) 'debug)
>               ;; Skip the frames for backtrace-debug, byte-code,
>               ;; and implement-debug-on-entry.
>               (backtrace-debug 4 t)
>               ;; Place an extra debug-on-exit for macro's.
>               (when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
>                 (backtrace-debug 5 t)))

> by this:

>             (when (eq (car debugger-args) 'debug)
>               ;; Skip the frames for backtrace-debug, byte-code,
>               ;; and implement-debug-on-entry.
>               (backtrace-debug 3 t)
>               ;; Place an extra debug-on-exit for macro's.
>               (when (eq 'lambda (car-safe (cadr (backtrace-frame 3))))
>                 (backtrace-debug 4 t)))

> compiled debug.el and loaded the compiled file.  This seems fix the
> problem.  Note that I was absolutely not knowing what I was doing.  But
> this experience may serve as a motivation for someone to fix this,
> please - the debugger is important!

I think you have the exactly right fix, so I just installed it in
`emacs-24'.  I actually virtually installed that same fix in trunk
earlier when making debug-on-entry use `advice-add' since that change
added one stack frame but I discovered (via trial and error) that the
above code did not need adjustment whereas other hard-coded constants
needed to be bumped by 1 (at that time, I didn't realize it was because
that code was buggy).
So AFAIK, this has been fixed on trunk for a few weeks now and is now
also fixed in `emacs-24'.


        Stefan





reply via email to

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