Mercurial > emacs
comparison lisp/progmodes/gdb-ui.el @ 90744:f1196eda45a0
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 622-623)
- Update from CVS
- Remove RCS keywords
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-167
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 30 Jan 2007 23:18:01 +0000 |
parents | f83d17e1ace6 |
children | 52a7f3f50b89 |
comparison
equal
deleted
inserted
replaced
90743:f83d17e1ace6 | 90744:f1196eda45a0 |
---|---|
846 "-var-evaluate-expression " varnum "\"\n") | 846 "-var-evaluate-expression " varnum "\"\n") |
847 `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))) | 847 `(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))) |
848 (setq gdb-pending-triggers | 848 (setq gdb-pending-triggers |
849 (delq 'gdb-var-update gdb-pending-triggers))) | 849 (delq 'gdb-var-update gdb-pending-triggers))) |
850 | 850 |
851 (defun gdb-var-delete-1 (varnum) | |
852 (gdb-enqueue-input | |
853 (list | |
854 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) | |
855 'gdba) | |
856 (concat "server interpreter mi \"-var-delete " varnum "\"\n") | |
857 (concat "-var-delete " varnum "\n")) | |
858 'ignore)) | |
859 (setq gdb-var-list (delq var gdb-var-list)) | |
860 (dolist (varchild gdb-var-list) | |
861 (if (string-match (concat (car var) "\\.") (car varchild)) | |
862 (setq gdb-var-list (delq varchild gdb-var-list))))) | |
863 | |
851 (defun gdb-var-delete () | 864 (defun gdb-var-delete () |
852 "Delete watch expression at point from the speedbar." | 865 "Delete watch expression at point from the speedbar." |
853 (interactive) | 866 (interactive) |
854 (if (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer) | 867 (if (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer) |
855 '(gdbmi gdba)) | 868 '(gdbmi gdba)) |
856 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) | 869 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) |
857 (varnum (car var))) | 870 (varnum (car var))) |
858 (if (string-match "\\." (car var)) | 871 (if (string-match "\\." (car var)) |
859 (message-box "Can only delete a root expression") | 872 (message-box "Can only delete a root expression") |
860 (gdb-enqueue-input | 873 (gdb-var-delete-1 varnum))))) |
861 (list | |
862 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) | |
863 'gdba) | |
864 (concat "server interpreter mi \"-var-delete " varnum "\"\n") | |
865 (concat "-var-delete " varnum "\n")) | |
866 'ignore)) | |
867 (setq gdb-var-list (delq var gdb-var-list)) | |
868 (dolist (varchild gdb-var-list) | |
869 (if (string-match (concat (car var) "\\.") (car varchild)) | |
870 (setq gdb-var-list (delq varchild gdb-var-list)))))))) | |
871 | 874 |
872 (defun gdb-var-delete-children (varnum) | 875 (defun gdb-var-delete-children (varnum) |
873 "Delete children of variable object at point from the speedbar." | 876 "Delete children of variable object at point from the speedbar." |
874 (gdb-enqueue-input | 877 (gdb-enqueue-input |
875 (list | 878 (list |
3441 (setcar (nthcdr 5 var) 'out-of-scope)) | 3444 (setcar (nthcdr 5 var) 'out-of-scope)) |
3442 ((string-equal match "true") | 3445 ((string-equal match "true") |
3443 (setcar (nthcdr 5 var) 'changed) | 3446 (setcar (nthcdr 5 var) 'changed) |
3444 (setcar (nthcdr 4 var) | 3447 (setcar (nthcdr 4 var) |
3445 (read (match-string 2)))) | 3448 (read (match-string 2)))) |
3446 ;; ((string-equal match "invalid") | 3449 ((string-equal match "invalid") |
3447 ;; (gdb-enqueue-input | 3450 (gdb-var-delete-1 varnum))))))) |
3448 ;; (list | |
3449 ;; (if (eq (buffer-local-value | |
3450 ;; 'gud-minor-mode gud-comint-buffer) 'gdba) | |
3451 ;; (concat "server interpreter mi \"-var-delete " | |
3452 ;; varnum "\"\n") | |
3453 ;; (concat "-var-delete " varnum "\n")) | |
3454 ;; 'ignore))) | |
3455 ))))) | |
3456 (setq gdb-pending-triggers | 3451 (setq gdb-pending-triggers |
3457 (delq 'gdb-var-update gdb-pending-triggers)) | 3452 (delq 'gdb-var-update gdb-pending-triggers)) |
3458 (gdb-speedbar-update)) | 3453 (gdb-speedbar-update)) |
3459 | 3454 |
3460 ;; Registers buffer. | 3455 ;; Registers buffer. |