ambevar-dotfiles/.emacs.d/lisp/init-gud.el

46 lines
1.3 KiB
EmacsLisp
Raw Normal View History

2017-10-08 20:36:28 +02:00
;;; GUD
2016-10-14 14:03:30 +02:00
2017-10-08 20:36:28 +02:00
;;; Set GUD to display many windows by default.
(setq gdb-many-windows t)
2017-10-08 20:36:28 +02:00
;;; Change GUD many-windows layout.
(defun gdb-setup-windows ()
2017-05-05 21:38:06 +02:00
"Layout the window pattern for `gdb-many-windows'.
Do not set `gdb-show-main' to true as we handle it manually here."
(setq gdb-source-window (selected-window))
(gdb-display-locals-buffer)
(delete-other-windows)
(gdb-display-stack-buffer)
(delete-other-windows)
(gdb-display-breakpoints-buffer)
(delete-other-windows)
(switch-to-buffer
(if gud-last-last-frame
(gud-find-file (car gud-last-last-frame))
(if gdb-main-file
(gud-find-file gdb-main-file)
;; Put buffer list in window if we can't find a source file.
(list-buffers-noselect))))
(split-window-horizontally)
(other-window 1)
2017-05-05 21:38:06 +02:00
(split-window nil (/ ( * (window-height) 3) 4))
(split-window nil (/ (window-height) 3))
(gdb-set-window-buffer (gdb-locals-buffer-name))
2017-05-05 21:38:06 +02:00
(split-window-horizontally)
(other-window 1)
2017-05-24 00:27:02 +02:00
(gdb-set-window-buffer (gdb-get-buffer-create 'gdb-inferior-io))
2017-05-05 21:38:06 +02:00
(other-window 1)
(gdb-set-window-buffer gud-comint-buffer)
(other-window 1)
(gdb-set-window-buffer (gdb-stack-buffer-name))
(split-window-horizontally)
(other-window 1)
(gdb-set-window-buffer (gdb-breakpoints-buffer-name))
(other-window 1))
(provide 'init-gud)