0.9.13.22:
[sbcl.git] / src / runtime / x86-arch.c
index c3f9268..428ad5f 100644 (file)
@@ -250,7 +250,7 @@ sigtrap_handler(int signal, siginfo_t *info, void *void_context)
        single-stepping (as far as I can tell) this is somewhat moot,
        but it might be worth either moving this code up or deleting
        the single-stepping code entirely.  -- CSR, 2002-07-15 */
-#ifdef LISP_FEATURE_LINUX
+#if defined(LISP_FEATURE_LINUX) || defined(RESTORE_FP_CONTROL_FROM_CONTEXT)
     os_restore_fp_control(context);
 #endif
 
@@ -317,6 +317,9 @@ static void
 sigill_handler(int signal, siginfo_t *siginfo, void *void_context) {
     os_context_t *context = (os_context_t*)void_context;
 
+    /* Triggering SIGTRAP using int3 is unreliable on OS X/x86, so
+     * we need to use illegal instructions for traps.
+     */
 #if defined(LISP_FEATURE_DARWIN)
     if (*((unsigned short *)*os_context_pc_addr(context)) == 0x0b0f) {
         *os_context_pc_addr(context) += 2;