diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 20 |
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6137c91eb8e..8de3188da8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,10 +4,11 @@ | |||
| 4 | selected window. This still doesn't work for speedbar. | 4 | selected window. This still doesn't work for speedbar. |
| 5 | (gud-speedbar-buttons): Handle strings properly. | 5 | (gud-speedbar-buttons): Handle strings properly. |
| 6 | 6 | ||
| 7 | * progmodes/gdb-ui.el (gdb-var-create-handler) | 7 | * progmodes/gdb-ui.el (gdb-var-evaluate-expression-handler) |
| 8 | (gdb-var-evaluate-expression-handler): Handle strings properly. | 8 | (gdb-var-create-handler): Handle string expressions properly. |
| 9 | (gdb-var-list-children-regexp, gdb-var-list-children-handler): | 9 | (gdb-var-list-children-regexp, gdb-var-list-children-handler): |
| 10 | Handle strings properly. Move "type" field into regexp. | 10 | Handle string expressions properly. Move "type" field into |
| 11 | regexp. | ||
| 11 | 12 | ||
| 12 | 2005-11-12 Karl Fogel <kfogel@red-bean.com> | 13 | 2005-11-12 Karl Fogel <kfogel@red-bean.com> |
| 13 | 14 | ||
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index fed5057b9c6..dfd32256d3c 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -491,7 +491,9 @@ With arg, use separate IO iff arg is positive." | |||
| 491 | (unless (string-equal | 491 | (unless (string-equal |
| 492 | speedbar-initial-expansion-list-name "GUD") | 492 | speedbar-initial-expansion-list-name "GUD") |
| 493 | (speedbar-change-initial-expansion-list "GUD")) | 493 | (speedbar-change-initial-expansion-list "GUD")) |
| 494 | (if (equal (nth 2 var) "0") | 494 | (if (or (equal (nth 2 var) "0") |
| 495 | (and (equal (nth 2 var) "1") | ||
| 496 | (equal (nth 3 var) "char *"))) | ||
| 495 | (gdb-enqueue-input | 497 | (gdb-enqueue-input |
| 496 | (list | 498 | (list |
| 497 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) | 499 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) |
| @@ -509,14 +511,14 @@ With arg, use separate IO iff arg is positive." | |||
| 509 | (defun gdb-var-evaluate-expression-handler (varnum changed) | 511 | (defun gdb-var-evaluate-expression-handler (varnum changed) |
| 510 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 512 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| 511 | (goto-char (point-min)) | 513 | (goto-char (point-min)) |
| 512 | (re-search-forward ".*value=\"\\(.*?\\)\"" nil t) | 514 | (re-search-forward ".*value=\\(\".+\"\\)" nil t) |
| 513 | (catch 'var-found | 515 | (catch 'var-found |
| 514 | (let ((num 0)) | 516 | (let ((num 0)) |
| 515 | (dolist (var gdb-var-list) | 517 | (dolist (var gdb-var-list) |
| 516 | (if (string-equal varnum (cadr var)) | 518 | (if (string-equal varnum (cadr var)) |
| 517 | (progn | 519 | (progn |
| 518 | (if changed (setcar (nthcdr 5 var) t)) | 520 | (if changed (setcar (nthcdr 5 var) t)) |
| 519 | (setcar (nthcdr 4 var) (match-string 1)) | 521 | (setcar (nthcdr 4 var) (read (match-string 1))) |
| 520 | (setcar (nthcdr num gdb-var-list) var) | 522 | (setcar (nthcdr num gdb-var-list) var) |
| 521 | (throw 'var-found nil))) | 523 | (throw 'var-found nil))) |
| 522 | (setq num (+ num 1)))))) | 524 | (setq num (+ num 1)))))) |
| @@ -528,7 +530,8 @@ With arg, use separate IO iff arg is positive." | |||
| 528 | `(lambda () (gdb-var-list-children-handler ,varnum))))) | 530 | `(lambda () (gdb-var-list-children-handler ,varnum))))) |
| 529 | 531 | ||
| 530 | (defconst gdb-var-list-children-regexp | 532 | (defconst gdb-var-list-children-regexp |
| 531 | "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"") | 533 | "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",\ |
| 534 | type=\"\\(.*?\\)\"") | ||
| 532 | 535 | ||
| 533 | (defun gdb-var-list-children-handler (varnum) | 536 | (defun gdb-var-list-children-handler (varnum) |
| 534 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) | 537 | (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) |
| @@ -543,14 +546,15 @@ With arg, use separate IO iff arg is positive." | |||
| 543 | (let ((varchild (list (match-string 2) | 546 | (let ((varchild (list (match-string 2) |
| 544 | (match-string 1) | 547 | (match-string 1) |
| 545 | (match-string 3) | 548 | (match-string 3) |
| 546 | nil nil nil))) | 549 | (match-string 4) |
| 547 | (if (looking-at ",type=\"\\(.*?\\)\"") | 550 | nil nil))) |
| 548 | (setcar (nthcdr 3 varchild) (match-string 1))) | ||
| 549 | (dolist (var1 gdb-var-list) | 551 | (dolist (var1 gdb-var-list) |
| 550 | (if (string-equal (cadr var1) (cadr varchild)) | 552 | (if (string-equal (cadr var1) (cadr varchild)) |
| 551 | (throw 'child-already-watched nil))) | 553 | (throw 'child-already-watched nil))) |
| 552 | (push varchild var-list) | 554 | (push varchild var-list) |
| 553 | (if (equal (nth 2 varchild) "0") | 555 | (if (or (equal (nth 2 varchild) "0") |
| 556 | (and (equal (nth 2 varchild) "1") | ||
| 557 | (equal (nth 3 varchild) "char *"))) | ||
| 554 | (gdb-enqueue-input | 558 | (gdb-enqueue-input |
| 555 | (list | 559 | (list |
| 556 | (concat | 560 | (concat |