diff options
Diffstat (limited to 'lisp/progmodes/gud.el')
| -rw-r--r-- | lisp/progmodes/gud.el | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 31b9e7d7204..7d4fc00cd56 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -140,6 +140,9 @@ Used to grey out relevant togolbar icons.") | |||
| 140 | :enable (and (not gud-running) | 140 | :enable (and (not gud-running) |
| 141 | (memq gud-minor-mode | 141 | (memq gud-minor-mode |
| 142 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) | 142 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) |
| 143 | ([print*] menu-item "Print Dereference" gud-pstar | ||
| 144 | :enable (and (not gud-running) | ||
| 145 | (memq gud-minor-mode '(gdbmi gdba gdb)))) | ||
| 143 | ([print] menu-item "Print Expression" gud-print | 146 | ([print] menu-item "Print Expression" gud-print |
| 144 | :enable (not gud-running)) | 147 | :enable (not gud-running)) |
| 145 | ([watch] menu-item "Watch Expression" gud-watch | 148 | ([watch] menu-item "Watch Expression" gud-watch |
| @@ -183,18 +186,19 @@ Used to grey out relevant togolbar icons.") | |||
| 183 | (dolist (x '((gud-break . "gud-break") | 186 | (dolist (x '((gud-break . "gud-break") |
| 184 | (gud-remove . "gud-remove") | 187 | (gud-remove . "gud-remove") |
| 185 | (gud-print . "gud-print") | 188 | (gud-print . "gud-print") |
| 189 | (gud-pstar . "gud-pstar") | ||
| 186 | (gud-watch . "gud-watch") | 190 | (gud-watch . "gud-watch") |
| 187 | (gud-run . "gud-run") | ||
| 188 | (gud-until . "gud-until") | ||
| 189 | (gud-cont . "gud-cont") | 191 | (gud-cont . "gud-cont") |
| 192 | (gud-until . "gud-until") | ||
| 193 | (gud-finish . "gud-finish") | ||
| 194 | (gud-run . "gud-run") | ||
| 190 | ;; gud-s, gud-si etc. instead of gud-step, | 195 | ;; gud-s, gud-si etc. instead of gud-step, |
| 191 | ;; gud-stepi, to avoid file-name clashes on DOS | 196 | ;; gud-stepi, to avoid file-name clashes on DOS |
| 192 | ;; 8+3 filesystems. | 197 | ;; 8+3 filesystems. |
| 193 | (gud-step . "gud-s") | ||
| 194 | (gud-next . "gud-n") | 198 | (gud-next . "gud-n") |
| 195 | (gud-finish . "gud-finish") | 199 | (gud-step . "gud-s") |
| 196 | (gud-stepi . "gud-si") | ||
| 197 | (gud-nexti . "gud-ni") | 200 | (gud-nexti . "gud-ni") |
| 201 | (gud-stepi . "gud-si") | ||
| 198 | (gud-up . "gud-up") | 202 | (gud-up . "gud-up") |
| 199 | (gud-down . "gud-down") | 203 | (gud-down . "gud-down") |
| 200 | (gud-goto-info . "info")) | 204 | (gud-goto-info . "info")) |
| @@ -580,6 +584,8 @@ and source-file directory for your debugger." | |||
| 580 | (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") | 584 | (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") |
| 581 | (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") | 585 | (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") |
| 582 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") | 586 | (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") |
| 587 | (gud-def gud-pstar "print* %e" nil | ||
| 588 | "Evaluate C dereferenced pointer expression at point.") | ||
| 583 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") | 589 | (gud-def gud-until "until %l" "\C-u" "Continue to current line.") |
| 584 | (gud-def gud-run "run" nil "Run the program.") | 590 | (gud-def gud-run "run" nil "Run the program.") |
| 585 | 591 | ||
| @@ -1214,7 +1220,7 @@ containing the executable being debugged." | |||
| 1214 | The directory containing FILE becomes the initial working directory | 1220 | The directory containing FILE becomes the initial working directory |
| 1215 | and source-file directory for your debugger. | 1221 | and source-file directory for your debugger. |
| 1216 | 1222 | ||
| 1217 | You can set the variable 'gud-xdb-directories' to a list of program source | 1223 | You can set the variable `gud-xdb-directories' to a list of program source |
| 1218 | directories if your program contains sources from more than one directory." | 1224 | directories if your program contains sources from more than one directory." |
| 1219 | (interactive (list (gud-query-cmdline 'xdb))) | 1225 | (interactive (list (gud-query-cmdline 'xdb))) |
| 1220 | 1226 | ||
| @@ -3133,8 +3139,6 @@ only tooltips in the buffer containing the overlay arrow." | |||
| 3133 | 'gud-tooltip-modes "22.1") | 3139 | 'gud-tooltip-modes "22.1") |
| 3134 | (define-obsolete-variable-alias 'tooltip-gud-display | 3140 | (define-obsolete-variable-alias 'tooltip-gud-display |
| 3135 | 'gud-tooltip-display "22.1") | 3141 | 'gud-tooltip-display "22.1") |
| 3136 | (define-obsolete-variable-alias 'tooltip-use-echo-area | ||
| 3137 | 'gud-tooltip-echo-area "22.1") | ||
| 3138 | 3142 | ||
| 3139 | ;;; Reacting on mouse movements | 3143 | ;;; Reacting on mouse movements |
| 3140 | 3144 | ||
| @@ -3236,7 +3240,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") | |||
| 3236 | 3240 | ||
| 3237 | ; This will only display data that comes in one chunk. | 3241 | ; This will only display data that comes in one chunk. |
| 3238 | ; Larger arrays (say 400 elements) are displayed in | 3242 | ; Larger arrays (say 400 elements) are displayed in |
| 3239 | ; the tootip incompletely and spill over into the gud buffer. | 3243 | ; the tooltip incompletely and spill over into the gud buffer. |
| 3240 | ; Switching the process-filter creates timing problems and | 3244 | ; Switching the process-filter creates timing problems and |
| 3241 | ; it may be difficult to do better. Using annotations as in | 3245 | ; it may be difficult to do better. Using annotations as in |
| 3242 | ; gdb-ui.el gets round this problem. | 3246 | ; gdb-ui.el gets round this problem. |
| @@ -3244,7 +3248,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") | |||
| 3244 | "Process debugger output and show it in a tooltip window." | 3248 | "Process debugger output and show it in a tooltip window." |
| 3245 | (set-process-filter process gud-tooltip-original-filter) | 3249 | (set-process-filter process gud-tooltip-original-filter) |
| 3246 | (tooltip-show (tooltip-strip-prompt process output) | 3250 | (tooltip-show (tooltip-strip-prompt process output) |
| 3247 | gud-tooltip-echo-area)) | 3251 | (or gud-tooltip-echo-area tooltip-use-echo-area))) |
| 3248 | 3252 | ||
| 3249 | (defun gud-tooltip-print-command (expr) | 3253 | (defun gud-tooltip-print-command (expr) |
| 3250 | "Return a suitable command to print the expression EXPR. | 3254 | "Return a suitable command to print the expression EXPR. |
| @@ -3289,7 +3293,9 @@ This function must return nil if it doesn't handle EVENT." | |||
| 3289 | (cddr mouse)))) | 3293 | (cddr mouse)))) |
| 3290 | (let ((define-elt (assoc expr gdb-define-alist))) | 3294 | (let ((define-elt (assoc expr gdb-define-alist))) |
| 3291 | (unless (null define-elt) | 3295 | (unless (null define-elt) |
| 3292 | (tooltip-show (cdr define-elt)) | 3296 | (tooltip-show |
| 3297 | (cdr define-elt) | ||
| 3298 | (or gud-tooltip-echo-area tooltip-use-echo-area)) | ||
| 3293 | expr)))) | 3299 | expr)))) |
| 3294 | (let ((cmd (gud-tooltip-print-command expr))) | 3300 | (let ((cmd (gud-tooltip-print-command expr))) |
| 3295 | (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb)) | 3301 | (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb)) |