]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle remote file names in gdb-mi.el
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 22 Aug 2016 18:02:51 +0000 (20:02 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 22 Aug 2016 18:02:51 +0000 (20:02 +0200)
* 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

index 4adcfe7ff16c9d5e4cf15018e767715d5b4a55a3..8047e208ea57fdb2786d7fa7b421dec9ac7b97d5 100644 (file)
@@ -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