summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2005-05-04 20:44:02 +0000
committerNick Roberts <nickrob@snap.net.nz>2005-05-04 20:44:02 +0000
commit4c192d5a24487dfb14972dcd9531d5da9eb16823 (patch)
treee9bed625304cbbbc8e42c646df80fe9cc8f53480 /lisp/progmodes/gdb-ui.el
parentae23f9801f5a5a4c5ce6348231ca3842ca0bb9fc (diff)
downloademacs-4c192d5a24487dfb14972dcd9531d5da9eb16823.tar.gz
emacs-4c192d5a24487dfb14972dcd9531d5da9eb16823.tar.bz2
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?
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el14
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.
:group 'gud
:version "22.1")
-(defcustom gdb-cpp-define-alist-program "gcc -E -dM -"
+(defcustom gdb-cpp-define-alist-program
+ (cond ((eq system-type 'ms-dos) "gcc -E -dM -o - -")
+ (t "gcc -E -dM -"))
"The program name for generating an alist of #define directives.
This list is used to display the #define directive associated
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."
:group 'gud
:version "22.1")
+(defcustom gdb-cpp-define-alist-flags ""
+ "*Preprocessor flags used by `gdb-create-define-alist'."
+ :type 'string
+ :group 'gud
+ :version "22.1")
+
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
(defun gdb-create-define-alist ()
+ "Create an alist of #define directives for GUD tooltips."
(let* ((file (buffer-file-name))
(output
(with-output-to-string
@@ -215,7 +224,8 @@ GDB, when tooltip-gud-tips-p is t."
(call-process shell-file-name
(if (file-exists-p file) file nil)
(list t nil) nil "-c"
- gdb-cpp-define-alist-program))))
+ (concat gdb-cpp-define-alist-program " "
+ gdb-cpp-define-alist-flags)))))
(define-list (split-string output "\n" t))
(name))
(setq gdb-define-alist nil)