Skip to content

Commit

Permalink
Add a command to run GDB (#1497)
Browse files Browse the repository at this point in the history
  • Loading branch information
palikar committed Feb 6, 2020
1 parent f49ef01 commit 84be1da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

* [#1497](https://github.com/bbatsov/projectile/pull/1497)] New command `projectile-run-gdb` (<kbd>x g</kbd> in `projectile-command-map`).

## 2.1.0 (2020-02-04)

### New features
Expand Down
10 changes: 10 additions & 0 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -3372,6 +3372,13 @@ regular expression."
(projectile-with-default-dir (projectile-ensure-project (projectile-project-root))
(call-interactively #'async-shell-command)))

;;;###autoload
(defun projectile-run-gdb ()
"Invoke `gdb' in the project's root."
(interactive)
(projectile-with-default-dir (projectile-ensure-project (projectile-project-root))
(call-interactively 'gdb)))

;;;###autoload
(defun projectile-run-shell (arg)
"Invoke `shell' in the project's root.
Expand Down Expand Up @@ -4624,6 +4631,7 @@ thing shown in the mode line otherwise."
(define-key map (kbd "x i") #'projectile-run-ielm)
(define-key map (kbd "x t") #'projectile-run-term)
(define-key map (kbd "x s") #'projectile-run-shell)
(define-key map (kbd "x g") #'projectile-run-gdb)
(define-key map (kbd "x v") #'projectile-run-vterm)
(define-key map (kbd "z") #'projectile-cache-current-file)
(define-key map (kbd "<left>") #'projectile-previous-project-buffer)
Expand Down Expand Up @@ -4668,6 +4676,8 @@ thing shown in the mode line otherwise."
["Replace in project" projectile-replace]
["Multi-occur in project" projectile-multi-occur]
"--"
["Run GDB" projectile-run-gdb]
"--"
["Run shell" projectile-run-shell]
["Run eshell" projectile-run-eshell]
["Run ielm" projectile-run-ielm]
Expand Down

0 comments on commit 84be1da

Please sign in to comment.