changeset 66456:885272126a8e

(def-gdb-auto-updated-buffer) (def-gdb-auto-update-trigger): Simplify construction. (gdb-locals-buffer): Use def-gdb-auto-update-trigger instead of def-gdb-auto-updated-buffer as gdb-info-locals-handler is defined explicitly. (gdb-assembler-buffer): Use def-gdb-auto-update-handler instead of def-gdb-auto-updated-buffer as gdb-invalidate-assembler is defined explicitly. (gdb-info-locals-custom): Remove as it's a no-op.
author Nick Roberts <nickrob@snap.net.nz>
date Wed, 26 Oct 2005 01:01:34 +0000
parents 237660a3108b
children 902db04fb1b3
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 7 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Wed Oct 26 01:00:30 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Wed Oct 26 01:01:34 2005 +0000
@@ -1200,7 +1200,7 @@
 (defmacro def-gdb-auto-update-trigger (name demand-predicate gdb-command
 					    output-handler)
   `(defun ,name (&optional ignored)
-     (if (and (,demand-predicate)
+     (if (and ,demand-predicate
 	      (not (member ',name
 			   gdb-pending-triggers)))
 	 (progn
@@ -1232,7 +1232,7 @@
   `(progn
      (def-gdb-auto-update-trigger ,trigger-name
        ;; The demand predicate:
-       (lambda () (gdb-get-buffer ',buffer-key))
+       (gdb-get-buffer ',buffer-key)
        ,gdb-command
        ,output-handler-name)
      (def-gdb-auto-update-handler ,output-handler-name
@@ -2153,11 +2153,10 @@
 		      'gdb-locals-buffer-name
 		      'gdb-locals-mode)
 
-(def-gdb-auto-updated-buffer gdb-locals-buffer
-  gdb-invalidate-locals
+(def-gdb-auto-update-trigger gdb-invalidate-locals
+  (gdb-get-buffer 'gdb-locals-buffer)
   "server info locals\n"
-  gdb-info-locals-handler
-  gdb-info-locals-custom)
+  gdb-info-locals-handler)
 
 ;; Abbreviate for arrays and structures.
 ;; These can be expanded using gud-display.
@@ -2187,9 +2186,6 @@
 		(set-window-point window p)))))
   (run-hooks 'gdb-info-locals-hook))
 
-(defun gdb-info-locals-custom ()
-  nil)
-
 (defvar gdb-locals-mode-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -2614,12 +2610,9 @@
 		      'gdb-assembler-buffer-name
 		      'gdb-assembler-mode)
 
-(def-gdb-auto-updated-buffer gdb-assembler-buffer
+(def-gdb-auto-update-handler gdb-assembler-handler
   gdb-invalidate-assembler
-  (concat gdb-server-prefix "disassemble "
-	  (if (member gdb-frame-address '(nil "main")) nil "0x")
-	  gdb-frame-address "\n")
-  gdb-assembler-handler
+  gdb-assembler-buffer
   gdb-assembler-custom)
 
 (defun gdb-assembler-custom ()