Function: gud-gdbmi-completions
gud-gdbmi-completions is a byte-compiled function defined in
gdb-mi.el.gz.
Signature
(gud-gdbmi-completions CONTEXT COMMAND)
Documentation
Completion table for GDB/MI commands.
COMMAND is the prefix for which we seek completion. CONTEXT is the text before COMMAND on the line.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gud-gdbmi-completions (context command)
"Completion table for GDB/MI commands.
COMMAND is the prefix for which we seek completion.
CONTEXT is the text before COMMAND on the line."
(let ((gud-gdb-fetch-lines-in-progress t)
(gud-gdb-fetch-lines-string nil)
(gud-gdb-fetch-lines-break (length context))
(gud-gdb-fetched-lines nil)
;; This filter dumps output lines to `gud-gdb-fetched-lines'.
(gud-marker-filter #'gud-gdbmi-fetch-lines-filter))
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
(gdb-input (concat "complete " context command)
(lambda () (setq gud-gdb-fetch-lines-in-progress nil)))
(while gud-gdb-fetch-lines-in-progress
(accept-process-output (get-buffer-process gud-comint-buffer))))
(gud-gdb-completions-1 gud-gdb-fetched-lines)))