aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/gdb-mi.el29
1 files changed, 0 insertions, 29 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index c0f995935d4..62d18e2c7c0 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2315,35 +2315,6 @@ the end of the current result or async record is reached."
2315; list ==> 2315; list ==>
2316; "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]" 2316; "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
2317 2317
2318;; The idea of the following function was suggested
2319;; by Kenichi Handa <handa@gnu.org>.
2320;;
2321;; FIXME: This is fragile: it relies on the assumption that all the
2322;; non-ASCII strings output by GDB, including names of the source
2323;; files, values of string variables in the inferior, etc., are all
2324;; encoded in the same encoding. It also assumes that the \nnn
2325;; sequences are not split between chunks of GDB process output due to
2326;; buffering, and arrive together. When/if GDB acquires the ability
2327;; to not escape-protect non-ASCII characters in its MI output, this
2328;; kludge should be removed.
2329(defun gdb-mi-decode (string)
2330 "Decode octal escapes in MI output STRING into multibyte text."
2331 (let ((coding
2332 (with-current-buffer
2333 (gdb-get-buffer-create 'gdb-partial-output-buffer)
2334 buffer-file-coding-system)))
2335 (with-temp-buffer
2336 (set-buffer-multibyte nil)
2337 (insert (gdb-mi-quote string))
2338 (goto-char (point-min))
2339 ;; gdb-mi-quote quotes the octal escapes as well, which
2340 ;; interferes with their interpretation by 'read' below. Remove
2341 ;; the extra backslashes to countermand that.
2342 (while (re-search-forward "\\\\\\(\\\\[2-3][0-7][0-7]\\)" nil t)
2343 (replace-match "\\1" nil nil))
2344 (goto-char (point-min))
2345 (decode-coding-string (read (current-buffer)) coding))))
2346
2347(defun gud-gdbmi-marker-filter (string) 2318(defun gud-gdbmi-marker-filter (string)
2348 "Filter GDB/MI output." 2319 "Filter GDB/MI output."
2349 2320