| 448 | | (when (or gdb-force-update |
|---|
| 449 | | (not (save-excursion |
|---|
| 450 | | (goto-char (point-min)) |
|---|
| 451 | | (looking-at "Watch Expressions:")))) |
|---|
| 452 | | (erase-buffer) |
|---|
| 453 | | (insert "Watch Expressions:\n") |
|---|
| 454 | | (if gdb-speedbar-auto-raise |
|---|
| 455 | | (raise-frame speedbar-frame)) |
|---|
| 456 | | (let ((var-list gdb-var-list) parent) |
|---|
| 457 | | (while var-list |
|---|
| 458 | | (let* (char (depth 0) (start 0) (var (car var-list)) |
|---|
| 459 | | (varnum (car var)) (expr (nth 1 var)) |
|---|
| 460 | | (type (nth 3 var)) (value (nth 4 var)) |
|---|
| 461 | | (status (nth 5 var))) |
|---|
| 462 | | (put-text-property |
|---|
| 463 | | 0 (length expr) 'face font-lock-variable-name-face expr) |
|---|
| 464 | | (put-text-property |
|---|
| 465 | | 0 (length type) 'face font-lock-type-face type) |
|---|
| 466 | | (while (string-match "\\." varnum start) |
|---|
| 467 | | (setq depth (1+ depth) |
|---|
| 468 | | start (1+ (match-beginning 0)))) |
|---|
| 469 | | (if (eq depth 0) (setq parent nil)) |
|---|
| 470 | | (if (or (equal (nth 2 var) "0") |
|---|
| 471 | | (and (equal (nth 2 var) "1") |
|---|
| 472 | | (string-match "char \\*$" type))) |
|---|
| | 448 | (erase-buffer) |
|---|
| | 449 | (insert "Watch Expressions:\n") |
|---|
| | 450 | (if gdb-speedbar-auto-raise |
|---|
| | 451 | (raise-frame speedbar-frame)) |
|---|
| | 452 | (let ((var-list gdb-var-list) parent) |
|---|
| | 453 | (while var-list |
|---|
| | 454 | (let* (char (depth 0) (start 0) (var (car var-list)) |
|---|
| | 455 | (varnum (car var)) (expr (nth 1 var)) |
|---|
| | 456 | (type (nth 3 var)) (value (nth 4 var)) |
|---|
| | 457 | (status (nth 5 var))) |
|---|
| | 458 | (put-text-property |
|---|
| | 459 | 0 (length expr) 'face font-lock-variable-name-face expr) |
|---|
| | 460 | (put-text-property |
|---|
| | 461 | 0 (length type) 'face font-lock-type-face type) |
|---|
| | 462 | (while (string-match "\\." varnum start) |
|---|
| | 463 | (setq depth (1+ depth) |
|---|
| | 464 | start (1+ (match-beginning 0)))) |
|---|
| | 465 | (if (eq depth 0) (setq parent nil)) |
|---|
| | 466 | (if (or (equal (nth 2 var) "0") |
|---|
| | 467 | (and (equal (nth 2 var) "1") |
|---|
| | 468 | (string-match "char \\*$" type))) |
|---|
| | 469 | (speedbar-make-tag-line |
|---|
| | 470 | 'bracket ?? nil nil |
|---|
| | 471 | (concat expr "\t" value) |
|---|
| | 472 | (if (or parent (eq status 'out-of-scope)) |
|---|
| | 473 | nil 'gdb-edit-value) |
|---|
| | 474 | nil |
|---|
| | 475 | (if gdb-show-changed-values |
|---|
| | 476 | (or parent (case status |
|---|
| | 477 | (changed 'font-lock-warning-face) |
|---|
| | 478 | (out-of-scope 'shadow) |
|---|
| | 479 | (t t))) |
|---|
| | 480 | t) |
|---|
| | 481 | depth) |
|---|
| | 482 | (if (eq status 'out-of-scope) (setq parent 'shadow)) |
|---|
| | 483 | (if (and (nth 1 var-list) |
|---|
| | 484 | (string-match (concat varnum "\\.") |
|---|
| | 485 | (car (nth 1 var-list)))) |
|---|
| | 486 | (setq char ?-) |
|---|
| | 487 | (setq char ?+)) |
|---|
| | 488 | (if (string-match "\\*$" type) |
|---|
| 486 | | (if (eq status 'out-of-scope) (setq parent 'shadow)) |
|---|
| 487 | | (if (and (nth 1 var-list) |
|---|
| 488 | | (string-match (concat varnum "\\.") |
|---|
| 489 | | (car (nth 1 var-list)))) |
|---|
| 490 | | (setq char ?-) |
|---|
| 491 | | (setq char ?+)) |
|---|
| 492 | | (if (string-match "\\*$" type) |
|---|
| 493 | | (speedbar-make-tag-line |
|---|
| 494 | | 'bracket char |
|---|
| 495 | | 'gdb-speedbar-expand-node varnum |
|---|
| 496 | | (concat expr "\t" type "\t" value) |
|---|
| 497 | | (if (or parent (eq status 'out-of-scope)) |
|---|
| 498 | | nil 'gdb-edit-value) |
|---|
| 499 | | nil |
|---|
| 500 | | (if gdb-show-changed-values |
|---|
| 501 | | (or parent (case status |
|---|
| 502 | | (changed 'font-lock-warning-face) |
|---|
| 503 | | (out-of-scope 'shadow) |
|---|
| 504 | | (t t))) |
|---|
| 505 | | t) |
|---|
| 506 | | depth) |
|---|
| 507 | | (speedbar-make-tag-line |
|---|
| 508 | | 'bracket char |
|---|
| 509 | | 'gdb-speedbar-expand-node varnum |
|---|
| 510 | | (concat expr "\t" type) |
|---|
| 511 | | nil nil |
|---|
| 512 | | (if (and (or parent status) gdb-show-changed-values) |
|---|
| 513 | | 'shadow t) |
|---|
| 514 | | depth)))) |
|---|
| 515 | | (setq var-list (cdr var-list)))) |
|---|
| 516 | | (setq gdb-force-update nil))) |
|---|
| | 503 | (speedbar-make-tag-line |
|---|
| | 504 | 'bracket char |
|---|
| | 505 | 'gdb-speedbar-expand-node varnum |
|---|
| | 506 | (concat expr "\t" type) |
|---|
| | 507 | nil nil |
|---|
| | 508 | (if (and (or parent status) gdb-show-changed-values) |
|---|
| | 509 | 'shadow t) |
|---|
| | 510 | depth)))) |
|---|
| | 511 | (setq var-list (cdr var-list))))) |
|---|