Function: gdb-get-location
gdb-get-location is a byte-compiled function defined in gdb-mi.el.gz.
Signature
(gdb-get-location BPTNO LINE FLAG)
Documentation
Glean name of source file using gdb-source-file-regexp, and visit it.
Place breakpoint icon in its buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdb-get-location (bptno line flag)
"Glean name of source file using `gdb-source-file-regexp', and visit it.
Place breakpoint icon in its buffer."
(goto-char (point-min))
(catch 'file-not-found
(let (source-file)
(if (re-search-forward gdb-source-file-regexp nil t)
(progn
(setq source-file (gdb-mi--c-string-from-string (match-string 1)))
(setq gdb-location-alist
(delete (cons bptno "File not found") gdb-location-alist))
(push (cons bptno source-file) gdb-location-alist))
(gdb-resync)
(unless (assoc bptno gdb-location-alist)
(push (cons bptno "File not found") gdb-location-alist)
(message-box "Cannot find source file for breakpoint location.
Add directory to search path for source files using the GDB command, dir."))
(throw 'file-not-found nil))
(with-current-buffer (find-file-noselect source-file)
(gdb-init-buffer)
;; Only want one breakpoint icon at each location.
(gdb-put-breakpoint-icon (string-equal flag "y") bptno
(string-to-number line))))))