Mercurial > emacs
comparison lisp/progmodes/gdb-ui.el @ 96751:5e647deae824
(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.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Wed, 16 Jul 2008 23:02:52 +0000 |
parents | cd65c90908c4 |
children | a9dc0e7c3f2b |
comparison
equal
deleted
inserted
replaced
96750:da03cfcc85a1 | 96751:5e647deae824 |
---|---|
468 "Create an alist of #define directives for GUD tooltips." | 468 "Create an alist of #define directives for GUD tooltips." |
469 (let* ((file (buffer-file-name)) | 469 (let* ((file (buffer-file-name)) |
470 (output | 470 (output |
471 (with-output-to-string | 471 (with-output-to-string |
472 (with-current-buffer standard-output | 472 (with-current-buffer standard-output |
473 (and file (file-exists-p file) | 473 (and file |
474 (call-process shell-file-name file | 474 (file-exists-p file) |
475 (list t nil) nil "-c" | 475 ;; call-process doesn't work with remote file names. |
476 (concat gdb-cpp-define-alist-program " " | 476 (not (file-remote-p default-directory)) |
477 gdb-cpp-define-alist-flags)))))) | 477 (call-process shell-file-name file |
478 (list t nil) nil "-c" | |
479 (concat gdb-cpp-define-alist-program " " | |
480 gdb-cpp-define-alist-flags)))))) | |
478 (define-list (split-string output "\n" t)) (name)) | 481 (define-list (split-string output "\n" t)) (name)) |
479 (setq gdb-define-alist nil) | 482 (setq gdb-define-alist nil) |
480 (dolist (define define-list) | 483 (dolist (define define-list) |
481 (setq name (nth 1 (split-string define "[( ]"))) | 484 (setq name (nth 1 (split-string define "[( ]"))) |
482 (push (cons name define) gdb-define-alist)))) | 485 (push (cons name define) gdb-define-alist)))) |
3271 (if (search-forward "Includes preprocessor macro info." nil t) | 3274 (if (search-forward "Includes preprocessor macro info." nil t) |
3272 (setq gdb-macro-info t)) | 3275 (setq gdb-macro-info t)) |
3273 (if gdb-many-windows | 3276 (if gdb-many-windows |
3274 (gdb-setup-windows) | 3277 (gdb-setup-windows) |
3275 (gdb-get-buffer-create 'gdb-breakpoints-buffer) | 3278 (gdb-get-buffer-create 'gdb-breakpoints-buffer) |
3276 (if gdb-show-main | 3279 (if (and gdb-show-main gdb-main-file) |
3277 (let ((pop-up-windows t)) | 3280 (let ((pop-up-windows t)) |
3278 (display-buffer (gud-find-file gdb-main-file))))) | 3281 (display-buffer (gud-find-file gdb-main-file))))) |
3279 (setq gdb-ready t)) | 3282 (setq gdb-ready t)) |
3280 | 3283 |
3281 (defun gdb-get-location (bptno line flag) | 3284 (defun gdb-get-location (bptno line flag) |