From caa2770d1d79f9c8013d6dddcd9e86d05230b26d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 22 Aug 2016 20:02:51 +0200 Subject: [PATCH] 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) --- lisp/progmodes/gdb-mi.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.11.4.GIT