diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ravi-init-cpp.el | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lisp/ravi-init-cpp.el b/lisp/ravi-init-cpp.el index 4ebdd84..c8a1d9d 100644 --- a/lisp/ravi-init-cpp.el +++ b/lisp/ravi-init-cpp.el @@ -591,5 +591,38 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named ) ) +(use-package gud + :commands gud-gdb + :bind ("C-x H-g" . show-debugger) + :init + (defun show-debugger () + (interactive) + (let ((gud-buf + (catch 'found + (dolist (buf (buffer-list)) + (if (string-match "\\*gud-" (buffer-name buf)) + (throw 'found buf)))))) + (if gud-buf + (switch-to-buffer-other-window gud-buf) + (call-interactively 'gud-gdb)))) + :config + (defhydra gud-gdb-hydra (:color red) + "gdb" + ("l" gud-refresh "refresh") + ("s" gud-step "step") + ("n" gud-next "next") + ("i" gud-stepi "stepi") + ("p" gud-print "print") + ("r" gud-cont "cont") + ("d" gud-remove "remove breakpoint") + ("t" gud-tbreak "temporary breakpoint") + ("u" gud-up "up frame") + (">" gud-down "down frame") + ("u" gud-until "until") + ("f" gud-finish "finish") + ("j" gud-jump "jump to line")) + (bind-key "M-g u" 'gud-gdb-hydra/body) + ) + (provide 'ravi-init-cpp) ;;; ravi-init-cpp.el ends here |
