diff options
| author | Nick Roberts | 2005-05-04 20:44:02 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-05-04 20:44:02 +0000 |
| commit | 4c192d5a24487dfb14972dcd9531d5da9eb16823 (patch) | |
| tree | e9bed625304cbbbc8e42c646df80fe9cc8f53480 | |
| parent | ae23f9801f5a5a4c5ce6348231ca3842ca0bb9fc (diff) | |
| download | emacs-4c192d5a24487dfb14972dcd9531d5da9eb16823.tar.gz emacs-4c192d5a24487dfb14972dcd9531d5da9eb16823.zip | |
(gdb-cpp-define-alist-flags): New variable.
(gdb-create-define-alist): Use. it.
(gdb-cpp-define-alist-program): Update for MS-DOS?
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index cf3e18c936d..56344a67e5c 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -196,7 +196,9 @@ detailed description of this mode. | |||
| 196 | :group 'gud | 196 | :group 'gud |
| 197 | :version "22.1") | 197 | :version "22.1") |
| 198 | 198 | ||
| 199 | (defcustom gdb-cpp-define-alist-program "gcc -E -dM -" | 199 | (defcustom gdb-cpp-define-alist-program |
| 200 | (cond ((eq system-type 'ms-dos) "gcc -E -dM -o - -") | ||
| 201 | (t "gcc -E -dM -")) | ||
| 200 | "The program name for generating an alist of #define directives. | 202 | "The program name for generating an alist of #define directives. |
| 201 | This list is used to display the #define directive associated | 203 | This list is used to display the #define directive associated |
| 202 | with an identifier as a tooltip. It works in a debug session with | 204 | with an identifier as a tooltip. It works in a debug session with |
| @@ -205,9 +207,16 @@ GDB, when tooltip-gud-tips-p is t." | |||
| 205 | :group 'gud | 207 | :group 'gud |
| 206 | :version "22.1") | 208 | :version "22.1") |
| 207 | 209 | ||
| 210 | (defcustom gdb-cpp-define-alist-flags "" | ||
| 211 | "*Preprocessor flags used by `gdb-create-define-alist'." | ||
| 212 | :type 'string | ||
| 213 | :group 'gud | ||
| 214 | :version "22.1") | ||
| 215 | |||
| 208 | (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") | 216 | (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") |
| 209 | 217 | ||
| 210 | (defun gdb-create-define-alist () | 218 | (defun gdb-create-define-alist () |
| 219 | "Create an alist of #define directives for GUD tooltips." | ||
| 211 | (let* ((file (buffer-file-name)) | 220 | (let* ((file (buffer-file-name)) |
| 212 | (output | 221 | (output |
| 213 | (with-output-to-string | 222 | (with-output-to-string |
| @@ -215,7 +224,8 @@ GDB, when tooltip-gud-tips-p is t." | |||
| 215 | (call-process shell-file-name | 224 | (call-process shell-file-name |
| 216 | (if (file-exists-p file) file nil) | 225 | (if (file-exists-p file) file nil) |
| 217 | (list t nil) nil "-c" | 226 | (list t nil) nil "-c" |
| 218 | gdb-cpp-define-alist-program)))) | 227 | (concat gdb-cpp-define-alist-program " " |
| 228 | gdb-cpp-define-alist-flags))))) | ||
| 219 | (define-list (split-string output "\n" t)) | 229 | (define-list (split-string output "\n" t)) |
| 220 | (name)) | 230 | (name)) |
| 221 | (setq gdb-define-alist nil) | 231 | (setq gdb-define-alist nil) |