From: Michael Albinus Date: Mon, 22 Aug 2016 18:02:51 +0000 (+0200) Subject: Handle remote file names in gdb-mi.el X-Git-Tag: emacs-26.0.90~1709 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=caa2770d1d79f9c8013d6dddcd9e86d05230b26d;p=emacs.git Handle remote file names in gdb-mi.el * lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer): If `default-directory' is remote, full file names are adapted accordingly. (Bug#23608) --- diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 4adcfe7ff16..8047e208ea5 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -2661,8 +2661,15 @@ responses. If FIX-LIST is non-nil, \"FIX-LIST={..}\" is replaced with \"FIX-LIST=[..]\" prior to parsing. This is used to fix broken -break-info output when it contains breakpoint script field -incompatible with GDB/MI output syntax." +incompatible with GDB/MI output syntax. + +If `default-directory' is remote, full file names are adapted accordingly." (save-excursion + (let ((remote (file-remote-p default-directory))) + (when remote + (goto-char (point-min)) + (while (re-search-forward "[\\[,]fullname=\"\\(.+\\)\"" nil t) + (replace-match (concat remote "\\1") nil nil nil 1)))) (goto-char (point-min)) (when fix-key (save-excursion