changeset 79812:52bc3192a217

(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.
author Nick Roberts <nickrob@snap.net.nz>
date Thu, 10 Jan 2008 10:27:02 +0000
parents 30bf335344a4
children 5f3ae36f1159
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Thu Jan 10 10:25:15 2008 +0000
+++ b/lisp/progmodes/gdb-ui.el	Thu Jan 10 10:27:02 2008 +0000
@@ -1214,10 +1214,12 @@
 
 (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 @@
       (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