summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-12-19 05:37:20 +0000
committerjao <jao@gnu.org>2021-12-19 05:37:20 +0000
commitfcd697f487fcc585d521e0565f70f6251c5f2a9f (patch)
treecd8c885ace625bf8713854a6812a4d5f959dd052
parentec580a16e10168eb8f12b686dca051719d37fcc4 (diff)
downloadgeiser-fcd697f487fcc585d521e0565f70f6251c5f2a9f.tar.gz
geiser-fcd697f487fcc585d521e0565f70f6251c5f2a9f.tar.bz2
New debugger commands: locals, registers, error
-rw-r--r--elisp/geiser-debug.el32
1 files changed, 25 insertions, 7 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index f73b6cd..b0705c6 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -107,7 +107,7 @@ all ANSI sequences."
(buffer-disable-undo)
(set-syntax-table scheme-mode-syntax-table)
(setq next-error-function 'geiser-edit--open-next)
- (compilation-minor-mode 1)
+ (compilation-setup t)
(setq buffer-read-only t))
(defvar-local geiser-debug--debugger-active-p nil)
@@ -138,21 +138,39 @@ all ANSI sequences."
(geiser-repl--switch-to-buffer geiser-debug--sender-buffer)))
(defun geiser-debug-debugger-quit ()
- "Quit the current debugging session level"
+ "Quit the current debugging session level."
(interactive)
(geiser-debug--send-to-repl 'quit))
(defun geiser-debug-debugger-backtrace ()
- "Quit the current debugging session level"
+ "Quit the current debugging session level."
(interactive)
- (geiser-debug--send-to-repl 'bt))
+ (geiser-debug--send-to-repl 'backtrace))
+
+(defun geiser-debug-debugger-locals ()
+ "Show local variables."
+ (interactive)
+ (geiser-debug--send-to-repl 'locals))
+
+(defun geiser-debug-debugger-registers ()
+ "Show register values."
+ (interactive)
+ (geiser-debug--send-to-repl 'registers))
+
+(defun geiser-debug-debugger-error ()
+ "Show error message."
+ (interactive)
+ (geiser-debug--send-to-repl 'error))
(transient-define-prefix geiser-debug--debugger-transient ()
- "Debugging meta-commands"
+ "Debugging meta-commands."
[:description (lambda () (format "%s debugger" (geiser-impl--impl-str)))
:if (lambda () geiser-debug--debugger-active-p)
- ("q" "Quit current debugger level" geiser-debug-debugger-quit)
- ("bt" "Display backtrace" geiser-debug-debugger-backtrace)])
+ ("x" "Quit current debugger level" geiser-debug-debugger-quit)
+ ("e" "Display error" geiser-debug-debugger-error)
+ ("b" "Display backtrace" geiser-debug-debugger-backtrace)
+ ("l" "Display locals" geiser-debug-debugger-locals)
+ ("r" "Display registers" geiser-debug-debugger-registers)])
;;; Implementation-dependent functionality