Function: gdb-find-file-hook

gdb-find-file-hook is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb-find-file-hook)

Documentation

Set up buffer for debugging if file is part of the source code of the current session.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdb-find-file-hook ()
  "Set up buffer for debugging if file is part of the source code
of the current session."
  (if (and (buffer-name gud-comint-buffer)
	   ;; in case gud or gdb-ui is just loaded
	   gud-comint-buffer
	   (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
	       'gdbmi))
      (if (member buffer-file-name gdb-source-file-list)
	  (with-current-buffer (find-buffer-visiting buffer-file-name)
	    (gdb-init-buffer)))))