Function: gud-gdb-run-command-fetch-lines

gud-gdb-run-command-fetch-lines is a byte-compiled function defined in gud.el.gz.

Signature

(gud-gdb-run-command-fetch-lines COMMAND BUFFER &optional SKIP)

Documentation

Run COMMAND, and return the list of lines it outputs.

BUFFER is the current buffer which may be the GUD buffer in which to run. SKIP is the number of chars to skip on each line, it defaults to 0.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
;(defun gud-gdb-selected-frame-info (buffer)
;  "Learn GDB information for the currently selected stack frame in BUFFER."
;  )

(defun gud-gdb-run-command-fetch-lines (command buffer &optional skip)
  "Run COMMAND, and return the list of lines it outputs.
BUFFER is the current buffer which may be the GUD buffer in which to run.
SKIP is the number of chars to skip on each line, it defaults to 0."
  (with-current-buffer gud-comint-buffer
    (unless (and (eq gud-comint-buffer buffer)
		 (save-excursion
		   (goto-char (point-max))
		   (forward-line 0)
		   (not (looking-at comint-prompt-regexp))))
      (let ((gud-gdb-fetch-lines-in-progress t)
	    (gud-gdb-fetched-lines nil)
	    (gud-gdb-fetch-lines-string nil)
	    (gud-gdb-fetch-lines-break (or skip 0))
	    (gud-marker-filter #'gud-gdb-fetch-lines-filter))
	;; Issue the command to GDB.
	(gud-basic-call command)
	;; Slurp the output.
	(while gud-gdb-fetch-lines-in-progress
	  (accept-process-output (get-buffer-process gud-comint-buffer)))
	(nreverse gud-gdb-fetched-lines)))))