[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tramp with GUD broken on trunk?
From: |
Nick Roberts |
Subject: |
Re: Tramp with GUD broken on trunk? |
Date: |
Wed, 11 Jul 2007 19:44:21 +1200 |
> Nick, if you like you could check what's left to do for gud.
The patch below works for me, both with an initial local default-directory
with, e.g.:
gdb --annotate=3 /ssh:192.168.1.5:/home/nickrob/myprog
and an initial remote directory (/ssh:192.168.1.5:/home/nickrob/) with:
gdb --annotate=3 myprog
It may be a bit of a hack but you may be able to generalise it.
Incidentally, I think something should display in the mode-line to say that
the default-directory is remote. Quite often there are similar files on
both machines and it's easy to forget which one you're looking at.
--
Nick http://www.inet.net.nz/~nickrob
*** gud.el 11 Jul 2007 10:28:18 +1200 1.132
--- gud.el 11 Jul 2007 18:53:19 +1200
*************** Used to grey out relevant toolbar icons.
*** 292,297 ****
--- 292,301 ----
(defun gud-file-name (f)
"Transform a relative file name to an absolute file name.
Uses `gud-<MINOR-MODE>-directories' to find the source files."
+ (let ((remote (file-remote-p default-directory)))
+ (when remote
+ (string-match "\\(.*:\\).*$" remote)
+ (setq f (concat (match-string 1 remote) f))))
(if (file-exists-p f) (expand-file-name f)
(let ((directories (gud-val 'directories))
(result nil))
*************** comint mode, which see."
*** 2510,2516 ****
(while (and w (not (eq (car w) t)))
(setq w (cdr w)))
(if w
! (setcar w file)))
(apply 'make-comint (concat "gud" filepart) program nil
(if massage-args (funcall massage-args file args) args))
;; Since comint clobbered the mode, we don't set it until now.
--- 2514,2523 ----
(while (and w (not (eq (car w) t)))
(setq w (cdr w)))
(if w
! (setcar w
! (if (file-remote-p default-directory)
! (setq file (file-name-nondirectory file))
! file))))
(apply 'make-comint (concat "gud" filepart) program nil
(if massage-args (funcall massage-args file args) args))
;; Since comint clobbered the mode, we don't set it until now.
- Re: Tramp with GUD broken on trunk?, (continued)
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Stefan Monnier, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Stefan Monnier, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Stefan Monnier, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Nick Roberts, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Nick Roberts, 2007/07/10
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/11
- Re: Tramp with GUD broken on trunk?,
Nick Roberts <=
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/11
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/11
- Re: Tramp with GUD broken on trunk?, Nick Roberts, 2007/07/11
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/12
- mode-line with Tramp [was: Re: Tramp with GUD broken on trunk?], Nick Roberts, 2007/07/12
- Re: mode-line with Tramp, Michael Albinus, 2007/07/15
- Re: mode-line with Tramp, Nick Roberts, 2007/07/16
- Re: mode-line with Tramp, Michael Albinus, 2007/07/17
- Re: mode-line with Tramp, Nick Roberts, 2007/07/18
- Re: mode-line with Tramp, Michael Albinus, 2007/07/19