diff options
| author | Nick Roberts | 2005-07-15 14:45:09 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-07-15 14:45:09 +0000 |
| commit | 4c199fcee98802d94f10be6fb1e3e99cc6e0d487 (patch) | |
| tree | 1abbedd36a46cb8096855e4df461d3ae2ac40b35 | |
| parent | fd9a7f35a18ec7d6ab0bdb5359d817641840184a (diff) | |
| download | emacs-4c199fcee98802d94f10be6fb1e3e99cc6e0d487.tar.gz emacs-4c199fcee98802d94f10be6fb1e3e99cc6e0d487.zip | |
(gdb-var-update, gdb-var-update-handler):
Don't consider gdbmi (gdb-mi.el has its own update functions).
(gdb-var-delete): Make it work for gdbmi as well.
(gdb-speedbar-expand-node): Move var-update here for gdbmi.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f4b6a705ea9..8a426a37365 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -503,15 +503,11 @@ Also display the main routine in the disassembly buffer if present." | |||
| 503 | (setq gdb-var-list (nreverse var-list)))))) | 503 | (setq gdb-var-list (nreverse var-list)))))) |
| 504 | 504 | ||
| 505 | (defun gdb-var-update () | 505 | (defun gdb-var-update () |
| 506 | (if (not (member 'gdb-var-update gdb-pending-triggers)) | 506 | (when (not (member 'gdb-var-update gdb-pending-triggers)) |
| 507 | (progn | 507 | (gdb-enqueue-input |
| 508 | (gdb-enqueue-input | 508 | (list "server interpreter mi \"-var-update *\"\n" |
| 509 | (list | 509 | 'gdb-var-update-handler)) |
| 510 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 510 | (push 'gdb-var-update gdb-pending-triggers))) |
| 511 | "server interpreter mi \"-var-update *\"\n" | ||
| 512 | "-var-update *\n") | ||
| 513 | 'gdb-var-update-handler)) | ||
| 514 | (push 'gdb-var-update gdb-pending-triggers)))) | ||
| 515 | 511 | ||
| 516 | (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") | 512 | (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") |
| 517 | 513 | ||
| @@ -522,13 +518,9 @@ Also display the main routine in the disassembly buffer if present." | |||
| 522 | (let ((varnum (match-string 1))) | 518 | (let ((varnum (match-string 1))) |
| 523 | (gdb-enqueue-input | 519 | (gdb-enqueue-input |
| 524 | (list | 520 | (list |
| 525 | (if (with-current-buffer gud-comint-buffer | 521 | (concat "server interpreter mi \"-var-evaluate-expression " |
| 526 | (eq gud-minor-mode 'gdba)) | 522 | varnum "\"\n") |
| 527 | (concat "server interpreter mi \"-var-evaluate-expression " | 523 | `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))))) |
| 528 | varnum "\"\n") | ||
| 529 | (concat "-var-evaluate-expression " varnum "\n")) | ||
| 530 | `(lambda () (gdb-var-evaluate-expression-handler | ||
| 531 | ,varnum t))))))) | ||
| 532 | (setq gdb-pending-triggers | 524 | (setq gdb-pending-triggers |
| 533 | (delq 'gdb-var-update gdb-pending-triggers)) | 525 | (delq 'gdb-var-update gdb-pending-triggers)) |
| 534 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 526 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| @@ -544,9 +536,10 @@ Also display the main routine in the disassembly buffer if present." | |||
| 544 | (speedbar-timer-fn))) | 536 | (speedbar-timer-fn))) |
| 545 | 537 | ||
| 546 | (defun gdb-var-delete () | 538 | (defun gdb-var-delete () |
| 547 | "Delete watched expression from the speedbar." | 539 | "Delete watch expression at point from the speedbar." |
| 548 | (interactive) | 540 | (interactive) |
| 549 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 541 | (if (with-current-buffer |
| 542 | gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba))) | ||
| 550 | (let ((text (speedbar-line-text))) | 543 | (let ((text (speedbar-line-text))) |
| 551 | (string-match "\\(\\S-+\\)" text) | 544 | (string-match "\\(\\S-+\\)" text) |
| 552 | (let* ((expr (match-string 1 text)) | 545 | (let* ((expr (match-string 1 text)) |
| @@ -595,7 +588,9 @@ INDENT is the current indentation depth." | |||
| 595 | (cond ((string-match "+" text) ;expand this node | 588 | (cond ((string-match "+" text) ;expand this node |
| 596 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 589 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 597 | (gdb-var-list-children token) | 590 | (gdb-var-list-children token) |
| 598 | (gdbmi-var-list-children token))) | 591 | (progn |
| 592 | (gdbmi-var-update) | ||
| 593 | (gdbmi-var-list-children token)))) | ||
| 599 | ((string-match "-" text) ;contract this node | 594 | ((string-match "-" text) ;contract this node |
| 600 | (dolist (var gdb-var-list) | 595 | (dolist (var gdb-var-list) |
| 601 | (if (string-match (concat token "\\.") (nth 1 var)) | 596 | (if (string-match (concat token "\\.") (nth 1 var)) |