diff options
| author | Michael Albinus | 2016-08-22 20:02:51 +0200 |
|---|---|---|
| committer | Michael Albinus | 2016-08-22 20:02:51 +0200 |
| commit | caa2770d1d79f9c8013d6dddcd9e86d05230b26d (patch) | |
| tree | e022e4c9c346e8a3755e9d9dc7d3bd11cfdc1efa | |
| parent | 821ea144bd446268fbe4a4a4775a06da52dea8cb (diff) | |
| download | emacs-caa2770d1d79f9c8013d6dddcd9e86d05230b26d.tar.gz emacs-caa2770d1d79f9c8013d6dddcd9e86d05230b26d.zip | |
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)
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 9 |
1 files changed, 8 insertions, 1 deletions
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. | |||
| 2661 | If FIX-LIST is non-nil, \"FIX-LIST={..}\" is replaced with | 2661 | If FIX-LIST is non-nil, \"FIX-LIST={..}\" is replaced with |
| 2662 | \"FIX-LIST=[..]\" prior to parsing. This is used to fix broken | 2662 | \"FIX-LIST=[..]\" prior to parsing. This is used to fix broken |
| 2663 | -break-info output when it contains breakpoint script field | 2663 | -break-info output when it contains breakpoint script field |
| 2664 | incompatible with GDB/MI output syntax." | 2664 | incompatible with GDB/MI output syntax. |
| 2665 | |||
| 2666 | If `default-directory' is remote, full file names are adapted accordingly." | ||
| 2665 | (save-excursion | 2667 | (save-excursion |
| 2668 | (let ((remote (file-remote-p default-directory))) | ||
| 2669 | (when remote | ||
| 2670 | (goto-char (point-min)) | ||
| 2671 | (while (re-search-forward "[\\[,]fullname=\"\\(.+\\)\"" nil t) | ||
| 2672 | (replace-match (concat remote "\\1") nil nil nil 1)))) | ||
| 2666 | (goto-char (point-min)) | 2673 | (goto-char (point-min)) |
| 2667 | (when fix-key | 2674 | (when fix-key |
| 2668 | (save-excursion | 2675 | (save-excursion |