diff options
| author | Dmitry Dzhus | 2009-08-08 22:30:26 +0000 |
|---|---|---|
| committer | Dmitry Dzhus | 2009-08-08 22:30:26 +0000 |
| commit | fe4740a674c79c679006c90fe53abce2250fedcf (patch) | |
| tree | 238786e4bb674f63e8c8f5f38df3f1625047a111 | |
| parent | e9b23a040feb02e98d6c877ae1cdca33d46028d2 (diff) | |
| download | emacs-fe4740a674c79c679006c90fe53abce2250fedcf.tar.gz emacs-fe4740a674c79c679006c90fe53abce2250fedcf.zip | |
(gdb-control-all-threads)
(gdb-control-current-thread): Interactive setters for
`gdb-gud-control-all-threads' to use in menu.
(gdb-show-run-p): Show «Go» when process is not active.
(gud-tool-bar-map): Add non-stop/A,T indicator. Uses
gud/thread.xpm and gud/all.xpm.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 37 |
2 files changed, 45 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b732cbdeb7c..b6213ebcab2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2009-08-08 Dmitry Dzhus <dima@sphinx.net.ru> | ||
| 2 | |||
| 3 | * progmodes/gdb-mi.el (gdb-control-all-threads) | ||
| 4 | (gdb-control-current-thread): Interactive setters for | ||
| 5 | `gdb-gud-control-all-threads' to use in menu. | ||
| 6 | (gdb-show-run-p): Show «Go» when process is not active. | ||
| 7 | (gud-tool-bar-map): Add non-stop/A,T indicator. Uses | ||
| 8 | gud/thread.xpm and gud/all.xpm. | ||
| 9 | |||
| 1 | 2009-08-08 Yoni Rabkin <yoni@rabkins.net> | 10 | 2009-08-08 Yoni Rabkin <yoni@rabkins.net> |
| 2 | 11 | ||
| 3 | * net/net-utils.el (net-utils-font-lock-keywords): New var. | 12 | * net/net-utils.el (net-utils-font-lock-keywords): New var. |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index b769792f788..5a8fde8203e 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -519,6 +519,19 @@ the list) is deleted every time a new one is added (at the front)." | |||
| 519 | (message (format "Logging of transaction %sabled" | 519 | (message (format "Logging of transaction %sabled" |
| 520 | (if gdb-enable-debug "en" "dis")))) | 520 | (if gdb-enable-debug "en" "dis")))) |
| 521 | 521 | ||
| 522 | ;; These two are used for menu and toolbar | ||
| 523 | (defun gdb-control-all-threads () | ||
| 524 | "Switch to non-stop/A mode." | ||
| 525 | (interactive) | ||
| 526 | (setq gdb-gud-control-all-threads t) | ||
| 527 | (message "Now in non-stop/A mode.")) | ||
| 528 | |||
| 529 | (defun gdb-control-current-thread () | ||
| 530 | "Switch to non-stop/T mode." | ||
| 531 | (interactive) | ||
| 532 | (setq gdb-gud-control-all-threads nil) | ||
| 533 | (message "Now in non-stop/T mode.")) | ||
| 534 | |||
| 522 | (defun gdb-find-watch-expression () | 535 | (defun gdb-find-watch-expression () |
| 523 | (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) | 536 | (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) |
| 524 | (varnum (car var)) expr array) | 537 | (varnum (car var)) expr array) |
| @@ -1669,7 +1682,8 @@ is running." | |||
| 1669 | 1682 | ||
| 1670 | (defun gdb-show-run-p () | 1683 | (defun gdb-show-run-p () |
| 1671 | "Return t if \"Run/continue\" should be shown on the toolbar." | 1684 | "Return t if \"Run/continue\" should be shown on the toolbar." |
| 1672 | (or (and (or | 1685 | (or (not gdb-active-process) |
| 1686 | (and (or | ||
| 1673 | (not gdb-gud-control-all-threads) | 1687 | (not gdb-gud-control-all-threads) |
| 1674 | (not gdb-non-stop)) | 1688 | (not gdb-non-stop)) |
| 1675 | (not gud-running)) | 1689 | (not gud-running)) |
| @@ -3824,6 +3838,27 @@ SPLIT-HORIZONTAL and show BUF in the new window." | |||
| 3824 | (define-key gud-menu-map [mi] | 3838 | (define-key gud-menu-map [mi] |
| 3825 | `(menu-item "GDB-MI" ,menu :visible (eq gud-minor-mode 'gdbmi)))) | 3839 | `(menu-item "GDB-MI" ,menu :visible (eq gud-minor-mode 'gdbmi)))) |
| 3826 | 3840 | ||
| 3841 | ;; TODO Fit these into tool-bar-local-item-from-menu call in gud.el. | ||
| 3842 | ;; GDB-MI menu will need to be moved to gud.el. We can't use | ||
| 3843 | ;; tool-bar-local-item-from-menu here because it appends new buttons | ||
| 3844 | ;; to toolbar from right to left while we want our A/T throttle to | ||
| 3845 | ;; show up right before Run button. | ||
| 3846 | (define-key-after gud-tool-bar-map [all-threads] | ||
| 3847 | '(menu-item "Switch to non-stop/A mode" gdb-control-all-threads | ||
| 3848 | :image (find-image '((:type xpm :file "gud/thread.xpm"))) | ||
| 3849 | :visible (and (eq gud-minor-mode 'gdbmi) | ||
| 3850 | gdb-non-stop | ||
| 3851 | (not gdb-gud-control-all-threads))) | ||
| 3852 | 'run) | ||
| 3853 | |||
| 3854 | (define-key-after gud-tool-bar-map [current-thread] | ||
| 3855 | '(menu-item "Switch to non-stop/T mode" gdb-control-current-thread | ||
| 3856 | :image (find-image '((:type xpm :file "gud/all.xpm"))) | ||
| 3857 | :visible (and (eq gud-minor-mode 'gdbmi) | ||
| 3858 | gdb-non-stop | ||
| 3859 | gdb-gud-control-all-threads)) | ||
| 3860 | 'all-threads) | ||
| 3861 | |||
| 3827 | (defun gdb-frame-gdb-buffer () | 3862 | (defun gdb-frame-gdb-buffer () |
| 3828 | "Display GUD buffer in a new frame." | 3863 | "Display GUD buffer in a new frame." |
| 3829 | (interactive) | 3864 | (interactive) |