branch: externals/realgud
commit bb967edd171abeb9db31e6aeb43ffc9c277b7f0d
Author: Fangrui Song <[email protected]>
Commit: Fangrui Song <[email protected]>
Add tbreak as per break
---
realgud/common/cmds.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/realgud/common/cmds.el b/realgud/common/cmds.el
index 594b8a0..0f20535 100644
--- a/realgud/common/cmds.el
+++ b/realgud/common/cmds.el
@@ -110,6 +110,7 @@ with other motion initiated by debugger messages."
(puthash "restart" "run" hash)
(puthash "shell" "shell" hash)
(puthash "step" "step %p" hash)
+ (puthash "tbreak" "tbreak %X:%l" hash)
(puthash "until" "until" hash)
(puthash "up" "up %p" hash)
hash)
@@ -180,6 +181,13 @@ With prefix argument LINE-NUMBER, prompt for line number."
(realgud:cmd--with-line-override line-number
(realgud:cmd-run-command line-number
"break")))
+(defun realgud:cmd-tbreak (&optional line-number)
+ "Set a temporary breakpoint at the current line.
+With prefix argument LINE-NUMBER, prompt for line number."
+ (interactive (realgud:cmd--line-number-from-prefix-arg))
+ (realgud:cmd--with-line-override line-number
+ (realgud:cmd-run-command line-number
"tbreak")))
+
(defun realgud:cmd-clear(&optional line-number)
"Delete breakpoint at the current line.
With prefix argument LINE-NUMBER, prompt for line number."