changeset 106573:2125c0e45659

(gdb-frame-handler): Only set gud-lat-frame when there are values for both file and line. (Bug#5060)
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 14 Dec 2009 09:44:43 +0000
parents 80607ca6d8f0
children 427e81917607
files lisp/progmodes/gdb-mi.el
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-mi.el	Mon Dec 14 09:44:13 2009 +0000
+++ b/lisp/progmodes/gdb-mi.el	Mon Dec 14 09:44:43 2009 +0000
@@ -3754,9 +3754,8 @@
       (setq gdb-frame-number (bindat-get-field frame 'level))
       (setq gdb-frame-address (bindat-get-field frame 'addr))
       (let ((line (bindat-get-field frame 'line)))
-        (setq gdb-selected-line (or (and line (string-to-number line))
-                                    nil)) ; don't fail if line is nil
-        (when line ; obey the current file only if we have line info
+        (setq gdb-selected-line (and line (string-to-number line)))
+        (when (and gdb-selected-file gdb-selected-line)
           (setq gud-last-frame (cons gdb-selected-file gdb-selected-line))
           (gud-display-frame)))
       (if gud-overlay-arrow-position