Commit caa2770d authored by Michael Albinus's avatar Michael Albinus
Browse files

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)
parent 821ea144
......@@ -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."
(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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment