Function: gud-xdb-marker-filter

gud-xdb-marker-filter is a byte-compiled function defined in gud.el.gz.

Signature

(gud-xdb-marker-filter STRING)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
;; xdb does not print the lines all at once, so we have to accumulate them
(defun gud-xdb-marker-filter (string)
  (let (result)
    (if (or (string-match comint-prompt-regexp string)
	    (string-match ".*\012" string))
	(setq result (concat gud-marker-acc string)
	      gud-marker-acc "")
      (setq gud-marker-acc (concat gud-marker-acc string)))
    (if result
	(if (or (string-match "\\([^\n \t:]+\\): [^:]+: \\([0-9]+\\)[: ]"
			      result)
                (string-match "[^: \t]+:[ \t]+\\([^:]+\\): [^:]+: \\([0-9]+\\):"
                              result))
            (let ((line (string-to-number (match-string 2 result)))
                  (file (gud-file-name (match-string 1 result))))
              (if file
                  (setq gud-last-frame (cons file line))))))
    (or result "")))