[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] add debugger command to quit Guile
From: |
Derek Peschel |
Subject: |
[PATCH] add debugger command to quit Guile |
Date: |
Fri, 21 Nov 2008 00:56:47 -0800 |
User-agent: |
Mutt/1.2.5.1i |
This patch may be a bit silly, but at least I've now dealt with it.
Apply it in the ice-9/debugger directory. I'm using the Guile 1.8.5
version of (ice-9 debugger).
--- command-loop.scm.orig 2008-10-21 14:07:42.000000000 -0700
+++ command-loop.scm 2008-11-17 15:58:27.000000000 -0800
@@ -45,6 +45,8 @@
;; Restore stack
(fluid-set! the-last-stack (fluid-ref before-signal-stack))
(apply display-error #f (current-error-port) args))
+ ((quit)
+ (apply throw key args))
(else
(display "Internal debugger error:\n")
(save-stack debugger-handler)
@@ -534,6 +536,8 @@
"Exit the debugger."
(debugger-command-loop-quit)))
+(define-command "quit-guile" '('optional exact-nonnegative-integer)
debugger:quit-guile)
+
(define-command-alias "f" "frame")
(define-command-alias '("info" "f") '("info" "frame"))
(define-command-alias "bt" "backtrace")
--- commands.scm.orig 2008-10-21 14:01:19.000000000 -0700
+++ commands.scm 2008-11-21 00:46:57.000000000 -0800
@@ -28,7 +28,8 @@
position
up
down
- frame))
+ frame
+ quit-guile))
(define (backtrace state n-frames)
"Print backtrace of all stack frames, or innermost COUNT frames.
@@ -143,4 +144,9 @@
(if n (set-stack-index! state (frame-number->index n (state-stack state))))
(write-state-short state))
+(define (quit-guile state arg)
+ "Exit Guile with status @var{arg}.
+With no argument, exit with status 0."
+ (quit (or arg 0)))
+
;;; (ice-9 debugger commands) ends here.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] add debugger command to quit Guile,
Derek Peschel <=