Function: gdbmi-bnf-result-and-async-record-impl
gdbmi-bnf-result-and-async-record-impl is a byte-compiled function
defined in gdb-mi.el.gz.
Signature
(gdbmi-bnf-result-and-async-record-impl)
Documentation
Common implementation of the result-record and async-record rule.
Both rules share the same syntax. Those records may be very large in size.
For that reason, the "result" part of the record is parsed by
gdbmi-bnf-incomplete-record-result, which will keep
receiving characters as they arrive from GDB until the record is complete.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdbmi-bnf-result-and-async-record-impl ()
"Common implementation of the result-record and async-record rule.
Both rules share the same syntax. Those records may be very large in size.
For that reason, the \"result\" part of the record is parsed by
`gdbmi-bnf-incomplete-record-result', which will keep
receiving characters as they arrive from GDB until the record is complete."
(let ((acc-length (length gud-marker-acc))
(prefix-offset gdbmi-bnf-offset))
(while (and (< prefix-offset acc-length)
(gdbmi-is-number (aref gud-marker-acc prefix-offset)))
(setq prefix-offset (1+ prefix-offset)))
(if (and (< prefix-offset acc-length)
(member (aref gud-marker-acc prefix-offset) '(?* ?+ ?= ?^))
(string-match "\\([0-9]*\\)\\([*+=^]\\)\\(.+?\\)\\([,\n]\\)"
gud-marker-acc gdbmi-bnf-offset))
(let ((token (match-string 1 gud-marker-acc))
(prefix (match-string 2 gud-marker-acc))
(class (match-string 3 gud-marker-acc))
(complete (string-equal (match-string 4 gud-marker-acc) "\n"))
class-alist
class-command)
(setq gdbmi-bnf-offset (match-end 0))
(if gdbmi-debug-mode (message "gdbmi-bnf-result-record: %s"
(match-string 0 gud-marker-acc)))
(setq class-alist
(cdr (assoc prefix gdbmi-bnf-result-state-configs)))
(setq class-command (cdr (assoc class class-alist)))
(if (null class-command)
(setq class-command (cdr (assoc 'default class-alist))))
(if complete
(if class-command
(if (equal (cdr class-command) 'progressive)
(funcall (car class-command) token "" complete)
(funcall (car class-command) token "")))
(setq gdbmi-bnf-state
(lambda ()
(gdbmi-bnf-incomplete-record-result token class-command)))
(funcall gdbmi-bnf-state))
t))))