From: Nick Roberts Date: Thu, 10 Jan 2008 10:27:02 +0000 (+0000) Subject: (gdb-dequeue-input): Make doubly sure X-Git-Tag: emacs-pretest-22.1.90~115 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=78971dff706c88562bdd848d2aea623401dc7049;p=emacs.git (gdb-dequeue-input): Make doubly sure session doesn't hang because gdb-pending-triggers is non-nil. (gdb-frame-handler): Use buffer-file-name instead of buffer-name in case of duplicate file names. --- diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index ef11668f022..d85bf23c7c5 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1214,10 +1214,12 @@ This filter may simply queue input for a later time." (defun gdb-dequeue-input () (let ((queue gdb-input-queue)) - (and queue - (let ((last (car (last queue)))) - (unless (nbutlast queue) (setq gdb-input-queue '())) - last)))) + (if queue + (let ((last (car (last queue)))) + (unless (nbutlast queue) (setq gdb-input-queue '())) + last) + ;; This should be nil here anyway but set it just to make sure. + (setq gdb-pending-triggers nil)))) (defun gdb-send-item (item) (setq gdb-flush-pending-output nil) @@ -3442,7 +3444,8 @@ BUFFER nil or omitted means use the current buffer." (let ((buffer (marker-buffer gud-overlay-arrow-position)) (position (marker-position gud-overlay-arrow-position))) (when (and buffer - (string-equal (buffer-name buffer) + (string-equal (file-name-nondirectory + (buffer-file-name buffer)) (file-name-nondirectory (match-string 3)))) (with-current-buffer buffer (setq fringe-indicator-alist