all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 10025@debbugs.gnu.org
Subject: bug#10025: 24.0.91; Lisp debugger not working right
Date: Sun, 18 Nov 2012 03:15:25 +0100	[thread overview]
Message-ID: <87txsn4pjk.fsf@web.de> (raw)
In-Reply-To: <20158.31264.608000.429932@gargle.gargle.HOWL> (Uday S. Reddy's message of "Sat, 12 Nov 2011 13:52:32 +0000")

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	other threads:[~2012-11-18  2:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12 13:52 bug#10025: 24.0.91; Lisp debugger not working right Uday S Reddy
2012-11-18  2:15 ` Michael Heerdegen [this message]
2012-11-20  2:32   ` Michael Heerdegen
2012-12-07  4:35   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txsn4pjk.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=10025@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.