diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2017-11-21 04:05:58 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2017-11-21 04:05:58 (GMT) |
| commit | 969c2ed2326b29c95c18e6871abb0c59e6542a92 (patch) | |
| tree | 32f791f31b627621c392e3f6fc5a59a1a2e3ebda /lisp | |
| parent | fb2a0fd856da3ea032a4941bb007db080d2eed22 (diff) | |
| download | dotemacs-969c2ed2326b29c95c18e6871abb0c59e6542a92.zip dotemacs-969c2ed2326b29c95c18e6871abb0c59e6542a92.tar.gz dotemacs-969c2ed2326b29c95c18e6871abb0c59e6542a92.tar.bz2 | |
GDB hydra
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 |
