changeset 69325:806b0c0e3bd1

(gdb-edit-value-handler): New function. (gdb-edit-value): Use it to report any errors.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 07 Mar 2006 10:42:19 +0000
parents 683d9a8996c0
children b7c903d07d4f
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Tue Mar 07 10:40:22 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Tue Mar 07 10:42:19 2006 +0000
@@ -796,7 +796,12 @@
 	  (concat "server interpreter mi \"-var-assign "
 		  varnum " " value "\"\n")
 	(concat "-var-assign " varnum " " value "\n"))
-	   'ignore))))
+	   `(lambda () (gdb-edit-value-handler ,value))))))
+
+(defun gdb-edit-value-handler (value)
+  (goto-char (point-min))
+  (if (re-search-forward gdb-error-regexp nil t)
+      (message-box "Invalid number or expression (%s)" value)))
 
 (defcustom gdb-show-changed-values t
   "If non-nil change the face of out of scope variables and changed values.