0.9.13.33: :SB-LDB in default build
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 7 Jun 2006 16:25:09 +0000 (16:25 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 7 Jun 2006 16:25:09 +0000 (16:25 +0000)
 * DISABLE-DEBUGGER now also turns LDB off, so scriptability remains the same.
 * Use lose() instead of monitor_or_something() in the runtime, and replace
   set_lossage_handler() with enable/disable_lossage_handler().

13 files changed:
NEWS
src/code/debug.lisp
src/runtime/alpha-arch.c
src/runtime/hppa-arch.c
src/runtime/interr.c
src/runtime/interr.h
src/runtime/interrupt.c
src/runtime/mips-arch.c
src/runtime/runtime.c
src/runtime/win32-os.c
src/runtime/x86-64-arch.c
src/runtime/x86-arch.c
version.lisp-expr

diff --git a/NEWS b/NEWS
index b688654..3c7b436 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ changes in sbcl-0.9.14 relative to sbcl-0.9.13:
     additionally it just doesn't work in SBCL as currently
     implemented, thanks to optimizations (that are always valid for
     the other three SLOT-VALUEish functions, but not for the setter).
+  * minor incompatibale change: the :SB-LDB feature is now enabled by
+    default, and DISABLE-DEBUGGER and ENABLE-DEBUGGER also affect
+    the low-level debugger.
   * bug fix: native unparsing of pathnames with :DIRECTORY NIL failed
     with a type error. (reported by blitz_ on #lisp)
   * bug fix: unparsing logical pathnames with :NAME :WILD :TYPE NIL
index e50eb41..db912d1 100644 (file)
@@ -641,16 +641,21 @@ reset to ~S."
 ;;; halt-on-failures and prompt-on-failures modes, suitable for
 ;;; noninteractive and interactive use respectively
 (defun disable-debugger ()
+  ;; Why conditionally? Why not disable it even if user has frobbed
+  ;; this hook? We could just save the old value in case of a later
+  ;; ENABLE-DEBUGGER.
   (when (eql *invoke-debugger-hook* nil)
     ;; *DEBUG-IO* used to be set here to *ERROR-OUTPUT* which is sort
     ;; of unexpected but mostly harmless, but then ENABLE-DEBUGGER had
     ;; to set it to a suitable value again and be very careful,
     ;; especially if the user has also set it. -- MG 2005-07-15
-    (setf *invoke-debugger-hook* 'debugger-disabled-hook)))
+    (setf *invoke-debugger-hook* 'debugger-disabled-hook)
+    (sb!alien:alien-funcall (sb!alien:extern-alien "disable_lossage_handler" (function sb!alien:void)))))
 
 (defun enable-debugger ()
   (when (eql *invoke-debugger-hook* 'debugger-disabled-hook)
-    (setf *invoke-debugger-hook* nil)))
+    (setf *invoke-debugger-hook* nil)
+    (sb!alien:alien-funcall (sb!alien:extern-alien "enable_lossage_handler" (function sb!alien:void)))))
 
 (defun show-restarts (restarts s)
   (cond ((null restarts)
index 91878cd..8fab937 100644 (file)
@@ -28,7 +28,6 @@
 #include "interrupt.h"
 #include "interr.h"
 #include "breakpoint.h"
-#include "monitor.h"
 
 extern char call_into_lisp_LRA[], call_into_lisp_end[];
 
index 3d1d934..8fba416 100644 (file)
@@ -23,7 +23,6 @@
 #include "interrupt.h"
 #include "interr.h"
 #include "breakpoint.h"
-#include "monitor.h"
 
 void arch_init(void)
 {
index 9238601..8d0b01b 100644 (file)
@@ -28,6 +28,7 @@
 #include "genesis/static-symbols.h"
 #include "genesis/vector.h"
 #include "thread.h"
+#include "monitor.h"
 \f
 /* the way that we shut down the system on a fatal error */
 
@@ -37,10 +38,14 @@ default_lossage_handler(void)
     exit(1);
 }
 static void (*lossage_handler)(void) = default_lossage_handler;
-void
-set_lossage_handler(void handler(void))
+
+void enable_lossage_handler(void)
+{
+    lossage_handler = monitor_or_something;
+}
+void disable_lossage_handler(void)
 {
-    lossage_handler = handler;
+    lossage_handler = default_lossage_handler;
 }
 
 void
index 3ebe8a1..e527fcb 100644 (file)
@@ -13,7 +13,8 @@
 #define _INTERR_H_
 
 extern void lose(char *fmt, ...) never_returns;
-extern void set_lossage_handler(void fun(void));
+extern void enable_lossage_handler(void);
+extern void disable_lossage_handler(void);
 extern void describe_internal_error(os_context_t *context);
 
 extern lispobj debug_print(lispobj string);
index 45cd2fd..357a5b2 100644 (file)
@@ -59,7 +59,6 @@
 #include "globals.h"
 #include "lispregs.h"
 #include "validate.h"
-#include "monitor.h"
 #include "gc.h"
 #include "alloc.h"
 #include "dynbind.h"
index 7d3a1a8..d63a380 100644 (file)
@@ -19,7 +19,6 @@
 #include "interrupt.h"
 #include "interr.h"
 #include "breakpoint.h"
-#include "monitor.h"
 
 #include "genesis/constants.h"
 
index cba2f73..1dba2da 100644 (file)
@@ -51,7 +51,6 @@
 #include "arch.h"
 #include "gc.h"
 #include "interr.h"
-#include "monitor.h"
 #include "validate.h"
 #include "core.h"
 #include "save.h"
@@ -357,7 +356,7 @@ main(int argc, char *argv[], char *envp[])
     define_var("nil", NIL, 1);
     define_var("t", T, 1);
 
-    set_lossage_handler(monitor_or_something);
+    enable_lossage_handler();
 
     globals_init();
 
index 45a4656..9b78fd5 100644 (file)
@@ -40,7 +40,6 @@
 #include "interr.h"
 #include "lispregs.h"
 #include "runtime.h"
-#include "monitor.h"
 #include "alloc.h"
 #include "genesis/primitive-objects.h"
 
@@ -521,8 +520,9 @@ EXCEPTION_DISPOSITION handle_exception(EXCEPTION_RECORD *exception_record,
     fflush(stderr);
 
     fake_foreign_function_call(context);
-    monitor_or_something();
+    lose("fake_foreign_function_call fell through");
 
+    /* FIXME: WTF? How are we supposed to end up here? */
     return ExceptionContinueSearch;
 }
 
index 6ee2690..b45dcd5 100644 (file)
@@ -24,7 +24,6 @@
 #include "interrupt.h"
 #include "interr.h"
 #include "breakpoint.h"
-#include "monitor.h"
 #include "thread.h"
 
 #include "genesis/static-symbols.h"
@@ -269,7 +268,7 @@ static void
 sigill_handler(int signal, siginfo_t *siginfo, void *void_context) {
     os_context_t *context = (os_context_t*)void_context;
     fake_foreign_function_call(context);
-    monitor_or_something();
+    lose("fake_foreign_function_call fell through");
 }
 
 void
index 428ad5f..9a835fa 100644 (file)
@@ -23,7 +23,6 @@
 #include "interrupt.h"
 #include "interr.h"
 #include "breakpoint.h"
-#include "monitor.h"
 #include "thread.h"
 
 #include "genesis/static-symbols.h"
@@ -328,7 +327,7 @@ sigill_handler(int signal, siginfo_t *siginfo, void *void_context) {
 #endif
 
     fake_foreign_function_call(context);
-    monitor_or_something();
+    lose("fake_foreign_call fell through");
 }
 
 void
index e7667ef..5f41a32 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.13.32"
+"0.9.13.33"