emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master caa2770: Handle remote file names in gdb-mi.el


From: Michael Albinus
Subject: [Emacs-diffs] master caa2770: Handle remote file names in gdb-mi.el
Date: Mon, 22 Aug 2016 18:02:59 +0000 (UTC)

branch: master
commit caa2770d1d79f9c8013d6dddcd9e86d05230b26d
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    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 4adcfe7..8047e20 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]