/[emacs]/emacs/lisp/progmodes/gdb-ui.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/gdb-ui.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.83 by nickrob, Tue Jul 12 05:31:08 2005 UTC revision 1.84 by nickrob, Fri Jul 15 14:45:09 2005 UTC
# Line 503  Also display the main routine in the dis Line 503  Also display the main routine in the dis
503         (setq gdb-var-list (nreverse var-list))))))         (setq gdb-var-list (nreverse var-list))))))
504    
505  (defun gdb-var-update ()  (defun gdb-var-update ()
506    (if (not (member 'gdb-var-update gdb-pending-triggers))    (when (not (member 'gdb-var-update gdb-pending-triggers))
507        (progn      (gdb-enqueue-input
508          (gdb-enqueue-input       (list "server interpreter mi \"-var-update *\"\n"
509           (list             'gdb-var-update-handler))
510            (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))      (push 'gdb-var-update gdb-pending-triggers)))
               "server interpreter mi \"-var-update *\"\n"  
             "-var-update *\n")  
                                  'gdb-var-update-handler))  
         (push 'gdb-var-update gdb-pending-triggers))))  
511    
512  (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"")  (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"")
513    
# Line 522  Also display the main routine in the dis Line 518  Also display the main routine in the dis
518          (let ((varnum (match-string 1)))          (let ((varnum (match-string 1)))
519            (gdb-enqueue-input            (gdb-enqueue-input
520             (list             (list
521              (if (with-current-buffer gud-comint-buffer              (concat "server interpreter mi \"-var-evaluate-expression "
522                    (eq gud-minor-mode 'gdba))                      varnum "\"\n")
523                  (concat "server interpreter mi \"-var-evaluate-expression "              `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
                         varnum "\"\n")  
               (concat "-var-evaluate-expression " varnum "\n"))  
                      `(lambda () (gdb-var-evaluate-expression-handler  
                                   ,varnum t)))))))  
524    (setq gdb-pending-triggers    (setq gdb-pending-triggers
525     (delq 'gdb-var-update gdb-pending-triggers))     (delq 'gdb-var-update gdb-pending-triggers))
526    (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))    (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
# Line 544  Also display the main routine in the dis Line 536  Also display the main routine in the dis
536      (speedbar-timer-fn)))      (speedbar-timer-fn)))
537    
538  (defun gdb-var-delete ()  (defun gdb-var-delete ()
539    "Delete watched expression from the speedbar."    "Delete watch expression at point from the speedbar."
540    (interactive)    (interactive)
541    (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))    (if (with-current-buffer
542              gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba)))
543        (let ((text (speedbar-line-text)))        (let ((text (speedbar-line-text)))
544          (string-match "\\(\\S-+\\)" text)          (string-match "\\(\\S-+\\)" text)
545          (let* ((expr (match-string 1 text))          (let* ((expr (match-string 1 text))
# Line 595  INDENT is the current indentation depth. Line 588  INDENT is the current indentation depth.
588    (cond ((string-match "+" text)        ;expand this node    (cond ((string-match "+" text)        ;expand this node
589           (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))           (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
590               (gdb-var-list-children token)               (gdb-var-list-children token)
591             (gdbmi-var-list-children token)))             (progn
592                 (gdbmi-var-update)
593                 (gdbmi-var-list-children token))))
594          ((string-match "-" text)        ;contract this node          ((string-match "-" text)        ;contract this node
595           (dolist (var gdb-var-list)           (dolist (var gdb-var-list)
596             (if (string-match (concat token "\\.") (nth 1 var))             (if (string-match (concat token "\\.") (nth 1 var))

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26