unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Derek Peschel <dpeschel@eskimo.com>
To: bug-gnu-emacs@gnu.org
Subject: Re: Emacs 21.2 -- debugger-frame-offset is 8, should be 6
Date: Tue, 29 Jan 2008 15:53:43 -0800	[thread overview]
Message-ID: <20080129155343.A12974@eskimo.com> (raw)
In-Reply-To: <20080129143501.A8723@eskimo.com>; from dpeschel@eskimo.com on Tue, Jan 29, 2008 at 02:35:01PM -0800

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

Sorry, I used mutt with a command line format I don't normally use, and
didn't have a chance to attach the patches and other files.  Here they are.

[-- Attachment #2: debug.el.patch-fix --]
[-- Type: text/plain, Size: 434 bytes --]

--- debug.el	Mon Jan 28 13:10:09 2008
+++ debug.el	Mon Jan 28 13:10:34 2008
@@ -300,7 +300,7 @@
 ;; within the first one that appears in the backtrace buffer.
 ;; Assumes debugger-frame is called from a key;
 ;; will be wrong if it is called with Meta-x.
-(defconst debugger-frame-offset 8 "")
+(defconst debugger-frame-offset 6 "")
 
 (defun debugger-jump ()
   "Continue to exit from this frame, with all debug-on-entry suspended."

[-- Attachment #3: debug.el.patch-test-fix --]
[-- Type: text/plain, Size: 1228 bytes --]

--- debug.el.new	Mon Jan 28 13:23:15 2008
+++ debug.el.new	Mon Jan 28 13:25:05 2008
@@ -300,7 +300,7 @@
 ;; within the first one that appears in the backtrace buffer.
 ;; Assumes debugger-frame is called from a key;
 ;; will be wrong if it is called with Meta-x.
-(defconst debugger-frame-offset 8 "")
+(defconst debugger-frame-offset 6 "")
 
 (defun debugger-jump ()
   "Continue to exit from this frame, with all debug-on-entry suspended."
@@ -379,6 +379,11 @@
 	(insert ? )))
   (beginning-of-line))
 
+(defun debugger-frame-info ()
+  "Show information about the frame at point."
+  (interactive)
+  (beginning-of-line)
+  (message "%s" (prin1-to-string (backtrace-frame (+ (debugger-frame-number) debugger-frame-offset)))))
 
 
 (put 'debugger-env-macro 'lisp-indent-function 0)
@@ -452,6 +457,7 @@
     (define-key debugger-mode-map "j" 'debugger-jump)
     (define-key debugger-mode-map "r" 'debugger-return-value)
     (define-key debugger-mode-map "u" 'debugger-frame-clear)
+    (define-key debugger-mode-map "i" 'debugger-frame-info)
     (define-key debugger-mode-map "d" 'debugger-step-through)
     (define-key debugger-mode-map "l" 'debugger-list-functions)
     (define-key debugger-mode-map "h" 'describe-mode)

[-- Attachment #4: debug.el.patch-test-orig --]
[-- Type: text/plain, Size: 862 bytes --]

--- debug.el	Mon Jan 28 13:23:15 2008
+++ debug.el	Mon Jan 28 13:24:00 2008
@@ -379,6 +379,11 @@
 	(insert ? )))
   (beginning-of-line))
 
+(defun debugger-frame-info ()
+  "Show information about the frame at point."
+  (interactive)
+  (beginning-of-line)
+  (message "%s" (prin1-to-string (backtrace-frame (+ (debugger-frame-number) debugger-frame-offset)))))
 
 
 (put 'debugger-env-macro 'lisp-indent-function 0)
@@ -452,6 +457,7 @@
     (define-key debugger-mode-map "j" 'debugger-jump)
     (define-key debugger-mode-map "r" 'debugger-return-value)
     (define-key debugger-mode-map "u" 'debugger-frame-clear)
+    (define-key debugger-mode-map "i" 'debugger-frame-info)
     (define-key debugger-mode-map "d" 'debugger-step-through)
     (define-key debugger-mode-map "l" 'debugger-list-functions)
     (define-key debugger-mode-map "h" 'describe-mode)

[-- Attachment #5: debugger-frame-offset-test.el --]
[-- Type: text/plain, Size: 223 bytes --]

q(defun fun1 ()
  (fun2))
(defun fun2 ()
  (fun3))
(defun fun3 ()
  (fun4))
(defun fun4 ()
  (fun5))
(defun fun5 ()
  (fun6))
(defun fun6 ()
  (fun7))
(defun fun7 ()
  (fun8))
(defun fun8 ()
  (debug nil "in fun8"))
(fun1)

  reply	other threads:[~2008-01-29 23:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 22:35 Emacs 21.2 -- debugger-frame-offset is 8, should be 6 Derek Peschel
2008-01-29 23:53 ` Derek Peschel [this message]
2008-01-30  6:26 ` Nick Roberts
2008-01-30 20:52 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20080129155343.A12974@eskimo.com \
    --to=dpeschel@eskimo.com \
    --cc=bug-gnu-emacs@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).