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: Michael Heerdegen
Subject: bug#10025: 24.0.91; Lisp debugger not working right
Date: Sun, 18 Nov 2012 03:15:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Uday S Reddy <u.s.reddy@cs.bham.ac.uk> writes:

> The Lisp debugger is still not working right in the Emacs 24 pre-release.
> (The old bug reports were #6209 and #9462.)
>
> (defun a ()
>   (b)
>   (c))
>
> (defun b ()
>   (message "b entered"))
>
> (defun c ()
>   (message "c entered"))
>
> Place a debug-on-entry on `b' and `c'
>
> When `b' is entered, the backtrace buffer shows:
> -----
> Debugger entered--entering a function:
>   b()
> * a()
>   eval((a) nil)
>   eval-expression((a) nil)
>   call-interactively(eval-expression nil nil)
> -----
> Note that there is a spurious breakpoint on `a', and no breakpoint on `b'.

I can still reproduce this annoying problem.

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!


Regards,

Michael.





reply via email to

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