Function: gdb-get-source-buffer
gdb-get-source-buffer is a byte-compiled function defined in
gdb-mi.el.gz.
Signature
(gdb-get-source-buffer)
Documentation
Return a buffer displaying source file or nil if we can't find one.
The source file is the file that contains the source location
where GDB stops. There could be multiple source files during a
debugging session, we get the most recently showed one. If
program hasn't started running yet, the source file is the "main
file" where the GDB session starts (see gdb-main-file).
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdb-get-source-buffer ()
"Return a buffer displaying source file or nil if we can't find one.
The source file is the file that contains the source location
where GDB stops. There could be multiple source files during a
debugging session, we get the most recently showed one. If
program hasn't started running yet, the source file is the \"main
file\" where the GDB session starts (see `gdb-main-file')."
(if gud-last-last-frame
(gud-find-file (car gud-last-last-frame))
(when gdb-main-file
(gud-find-file gdb-main-file))))