From e960eea6858c14dc39134438ef72040e53d94b97 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 14 Dec 2009 09:44:43 +0000 Subject: [PATCH] (gdb-frame-handler): Only set gud-lat-frame when there are values for both file and line. (Bug#5060) --- lisp/progmodes/gdb-mi.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 703f4ac6162..0f9532dcb3e 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -3754,9 +3754,8 @@ overlay arrow in source buffer." (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 -- 2.39.5