(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
`(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
'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.
(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)
'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 ()