diff options
| author | Nick Roberts | 2005-04-27 22:00:22 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-04-27 22:00:22 +0000 |
| commit | 9cc4d7dd649b05d5e07241dbe0b7cfcb5b51c5af (patch) | |
| tree | a47057c4f252a032ce667dabccb8bfaec44dc980 | |
| parent | a5bad486ccfcb53322c2f37daeb94059d21cb3fc (diff) | |
| download | emacs-9cc4d7dd649b05d5e07241dbe0b7cfcb5b51c5af.tar.gz emacs-9cc4d7dd649b05d5e07241dbe0b7cfcb5b51c5af.zip | |
(gdb-active-process): New variable.
(gdb-exited): New function.
(gdb-annotation-rules): Use it.
(gdb-starting): Set gdb-active-process to t.
(gdb-stopping): Amend doc string.
(gdb-reset): Set gdb-active-process to nil.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f0de784c252..b378adf0c07 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -82,6 +82,8 @@ | |||
| 82 | (defvar gdb-location-alist nil | 82 | (defvar gdb-location-alist nil |
| 83 | "Alist of breakpoint numbers and full filenames.") | 83 | "Alist of breakpoint numbers and full filenames.") |
| 84 | (defvar gdb-find-file-unhook nil) | 84 | (defvar gdb-find-file-unhook nil) |
| 85 | (defvar gdb-active-process nil "GUD tooltips display variable values when t, \ | ||
| 86 | and #define directives otherwise.") | ||
| 85 | 87 | ||
| 86 | (defvar gdb-buffer-type nil | 88 | (defvar gdb-buffer-type nil |
| 87 | "One of the symbols bound in `gdb-buffer-rules'.") | 89 | "One of the symbols bound in `gdb-buffer-rules'.") |
| @@ -776,8 +778,8 @@ This filter may simply queue input for a later time." | |||
| 776 | ("post-prompt" gdb-post-prompt) | 778 | ("post-prompt" gdb-post-prompt) |
| 777 | ("source" gdb-source) | 779 | ("source" gdb-source) |
| 778 | ("starting" gdb-starting) | 780 | ("starting" gdb-starting) |
| 779 | ("exited" gdb-stopping) | 781 | ("exited" gdb-exited) |
| 780 | ("signalled" gdb-stopping) | 782 | ("signalled" gdb-exited) |
| 781 | ("signal" gdb-stopping) | 783 | ("signal" gdb-stopping) |
| 782 | ("breakpoint" gdb-stopping) | 784 | ("breakpoint" gdb-stopping) |
| 783 | ("watchpoint" gdb-stopping) | 785 | ("watchpoint" gdb-stopping) |
| @@ -853,6 +855,7 @@ This sends the next command (if any) to gdb." | |||
| 853 | "An annotation handler for `starting'. | 855 | "An annotation handler for `starting'. |
| 854 | This says that I/O for the subprocess is now the program being debugged, | 856 | This says that I/O for the subprocess is now the program being debugged, |
| 855 | not GDB." | 857 | not GDB." |
| 858 | (setq gdb-active-process t) | ||
| 856 | (let ((sink gdb-output-sink)) | 859 | (let ((sink gdb-output-sink)) |
| 857 | (cond | 860 | (cond |
| 858 | ((eq sink 'user) | 861 | ((eq sink 'user) |
| @@ -865,7 +868,7 @@ not GDB." | |||
| 865 | (error "Unexpected `starting' annotation"))))) | 868 | (error "Unexpected `starting' annotation"))))) |
| 866 | 869 | ||
| 867 | (defun gdb-stopping (ignored) | 870 | (defun gdb-stopping (ignored) |
| 868 | "An annotation handler for `exited' and other annotations. | 871 | "An annotation handler for `breakpoint' and other annotations. |
| 869 | They say that I/O for the subprocess is now GDB, not the program | 872 | They say that I/O for the subprocess is now GDB, not the program |
| 870 | being debugged." | 873 | being debugged." |
| 871 | (if gdb-use-inferior-io-buffer | 874 | (if gdb-use-inferior-io-buffer |
| @@ -877,6 +880,16 @@ being debugged." | |||
| 877 | (gdb-resync) | 880 | (gdb-resync) |
| 878 | (error "Unexpected stopping annotation")))))) | 881 | (error "Unexpected stopping annotation")))))) |
| 879 | 882 | ||
| 883 | (defun gdb-exited (ignored) | ||
| 884 | "An annotation handler for `exited' and `signalled'. | ||
| 885 | They say that I/O for the subprocess is now GDB, not the program | ||
| 886 | being debugged and that the program is no longer running. This | ||
| 887 | function is used to change the focus of GUD tooltips to #define | ||
| 888 | directives." | ||
| 889 | (setq gdb-active-process nil) | ||
| 890 | (gdb-stopping ignored)) | ||
| 891 | |||
| 892 | |||
| 880 | (defun gdb-frame-begin (ignored) | 893 | (defun gdb-frame-begin (ignored) |
| 881 | (let ((sink gdb-output-sink)) | 894 | (let ((sink gdb-output-sink)) |
| 882 | (cond | 895 | (cond |
| @@ -2140,7 +2153,8 @@ Kills the gdb buffers and resets the source buffers." | |||
| 2140 | (gdb-remove-breakpoint-icons (point-min) (point-max) t) | 2153 | (gdb-remove-breakpoint-icons (point-min) (point-max) t) |
| 2141 | (setq gud-minor-mode nil) | 2154 | (setq gud-minor-mode nil) |
| 2142 | (kill-local-variable 'tool-bar-map) | 2155 | (kill-local-variable 'tool-bar-map) |
| 2143 | (setq gud-running nil)))))) | 2156 | (setq gud-running nil) |
| 2157 | (setq gdb-active-process nil)))))) | ||
| 2144 | (when (markerp gdb-overlay-arrow-position) | 2158 | (when (markerp gdb-overlay-arrow-position) |
| 2145 | (move-marker gdb-overlay-arrow-position nil) | 2159 | (move-marker gdb-overlay-arrow-position nil) |
| 2146 | (setq gdb-overlay-arrow-position nil)) | 2160 | (setq gdb-overlay-arrow-position nil)) |