[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [22.1.90]: Barf in left margin in *stack frames of emacs*
From: |
Nick Roberts |
Subject: |
Re: [22.1.90]: Barf in left margin in *stack frames of emacs* |
Date: |
Thu, 21 Feb 2008 00:51:08 +1300 |
> In *stack frames of emacs*, I can left-click in the right margin to
> horizontally scroll the window. Gud is good. However, when I
> left-click in the left margin to horizontally scroll back, I get an
> error.
>
> emacs -Q
> M-x gdb RET RET ; for me, running gdb on emacs
> In *gud-emacs*, put a breakpoint somewhere that will get hit and "r -Q"
>
> When the breakpoint hits, select "Options | Enter Debugger on Error" and
> "Gud | GDB-Frames | Stack" to popup the *stack frames of emacs* frame.
> Left-click in the right margin to horizontally scroll the *stack frames
> of emacs* window, then left-click in the left margin to scroll back. I
> get:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> file-name-nondirectory(nil)
> gud-format-command("break %f:%l" nil)
> gud-call("break %f:%l" nil)
> gud-break(nil)
> gdb-mouse-set-clear-breakpoint((mouse-1 (#<window 27 on *stack frames
> of emacs*> left-fringe (2 . 32) 178127836 nil 250 (0 . 2) nil (2 . 6) (8
> . 13))))
> call-interactively(gdb-mouse-set-clear-breakpoint)
Good catch. Does the patch below (on EMACS_22_BASE), fix it?
--
Nick http://www.inet.net.nz/~nickrob
*** gdb-ui.el 19 Feb 2008 21:55:10 +1300 1.206.2.19
--- gdb-ui.el 21 Feb 2008 00:47:52 +1300
*************** static char *magick[] = {
*** 1972,1986 ****
(interactive "e")
(mouse-minibuffer-check event)
(let ((posn (event-end event)))
! (if (numberp (posn-point posn))
! (with-selected-window (posn-window posn)
! (save-excursion
! (goto-char (posn-point posn))
! (if (or (posn-object posn)
! (eq (car (fringe-bitmaps-at-pos (posn-point posn)))
! 'breakpoint))
! (gud-remove nil)
! (gud-break nil)))))))
(defun gdb-mouse-toggle-breakpoint-margin (event)
"Enable/disable breakpoint in left margin with mouse click."
--- 1972,1988 ----
(interactive "e")
(mouse-minibuffer-check event)
(let ((posn (event-end event)))
! (if (buffer-file-name)
! (if (numberp (posn-point posn))
! (with-selected-window (posn-window posn)
! (save-excursion
! (goto-char (posn-point posn))
! (if (or (posn-object posn)
! (eq (car (fringe-bitmaps-at-pos (posn-point posn)))
! 'breakpoint))
! (gud-remove nil)
! (gud-break nil)))))
! (posn-set-point posn))))
(defun gdb-mouse-toggle-breakpoint-margin (event)
"Enable/disable breakpoint in left margin with mouse click."