From df478bbdca502f5aca9c5cd1988115c39e997ae3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 19 Sep 2009 11:43:15 +0000 Subject: [PATCH] (gdb-var-update-handler-1): Include case of older GDB where there is no has_more field. --- lisp/progmodes/gdb-ui.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f9a0b761949..0e12a33fe16 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -3861,15 +3861,16 @@ from=\"\\(.*?\\)\"\\)") (var (assoc varnum gdb-var-list)) (new-num (bindat-get-field change 'new_num_children))) (when var - (let ((scope (bindat-get-field change 'in_scope))) + (let ((scope (bindat-get-field change 'in_scope)) + (has-more (bindat-get-field change 'has_more))) (cond ((string-equal scope "false") (if gdb-delete-out-of-scope (gdb-var-delete-1 var varnum) (setcar (nthcdr 5 var) 'out-of-scope))) ((string-equal scope "true") - (setcar (nthcdr 6 var) - (bindat-get-field change 'has_more)) - (when (and (string-equal (nth 6 var) "0") + (setcar (nthcdr 6 var) has-more) + (when (and (or (not has-more) + (string-equal has-more "0")) (not new-num) (string-equal (nth 2 var) "0")) (setcar (nthcdr 4 var) -- 2.39.2