]> git.eshelyaron.com Git - emacs.git/commit
Parse GDB/MI results directly instead of going via JSON (bug#44173)
authorMattias Engdegård <mattiase@acm.org>
Sun, 25 Oct 2020 11:40:36 +0000 (12:40 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sat, 31 Oct 2020 12:42:07 +0000 (13:42 +0100)
commita78c6141bc1a34622894af3cee45f350e3b629ac
tree95c92d1285e5c5f716f9938e7ebf58d79e1f87a0
parent7f30bf72066514db44cf00b20f807bb360e1b968
Parse GDB/MI results directly instead of going via JSON (bug#44173)

Translating GDB/MI into JSON is an unnecessary and fragile detour
that made it hard to deal with octal escapes in strings correctly.
Parse GDB/MI directly instead.

* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): Adjust doc string.
(gdb-mi-decode, gud-gdbmi-marker-filter): Remove gdb-mi-decode.
(gdb-jsonify-buffer): Remove.
(gdb-mi--parse-tuple-or-list, gdb-mi--parse-c-string)
(gdb-mi--parse-value, gdb-mi--parse-result-or-value)
(gdb-mi--parse-results, gdb-mi--fix-key, gdb-mi--extend-fullname)
(gdb-mi--c-string-from-string): New functions.
(gdb-json-read-buffer, gdb-json-string, gdb-json-partial-output):
Rename to gdb-mi--read-buffer, gdb-mi--from-string and
gdb-mi--partial-output respectively.  Remove useless FIX-LIST
argument.  FIX-KEY is now a symbol, not a string. All callers updated.
(gdb-tooltip-print, gdbmi-bnf-log-stream-output, gdb-internals)
(gdb-console, gdb-done-or-error, gdb-get-source-file-list)
(gdb-get-prompt, gdb-get-source-file):
Use gdb-mi--c-string-from-string instead of 'read'.
* test/lisp/progmodes/gdb-mi-tests.el: New file.
lisp/progmodes/gdb-mi.el
test/lisp/progmodes/gdb-mi-tests.el [new file with mode: 0644]