summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2008-07-16 23:02:52 +0000
committerNick Roberts <nickrob@snap.net.nz>2008-07-16 23:02:52 +0000
commitcf7238adf9f3bcddb60d422c470b58605a1b8bad (patch)
treed504eaee280b06a9ed275b78dcb26d2876cb13cb /lisp/progmodes/gdb-ui.el
parent51390df783f4099a161009ecc4f7ab07d2f1fce7 (diff)
downloademacs-cf7238adf9f3bcddb60d422c470b58605a1b8bad.tar.gz
(gdb-create-define-alist): Don't create a
list of #defines for remote files. (gdb-source-info): Only show main if it has been found.
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 1b9ed9ad7e0..d704e6a5b06 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -470,11 +470,14 @@ otherwise do not."
(output
(with-output-to-string
(with-current-buffer standard-output
- (and file (file-exists-p file)
- (call-process shell-file-name file
- (list t nil) nil "-c"
- (concat gdb-cpp-define-alist-program " "
- gdb-cpp-define-alist-flags))))))
+ (and file
+ (file-exists-p file)
+ ;; call-process doesn't work with remote file names.
+ (not (file-remote-p default-directory))
+ (call-process shell-file-name file
+ (list t nil) nil "-c"
+ (concat gdb-cpp-define-alist-program " "
+ gdb-cpp-define-alist-flags))))))
(define-list (split-string output "\n" t)) (name))
(setq gdb-define-alist nil)
(dolist (define define-list)
@@ -3273,7 +3276,7 @@ buffers."
(if gdb-many-windows
(gdb-setup-windows)
(gdb-get-buffer-create 'gdb-breakpoints-buffer)
- (if gdb-show-main
+ (if (and gdb-show-main gdb-main-file)
(let ((pop-up-windows t))
(display-buffer (gud-find-file gdb-main-file)))))
(setq gdb-ready t))