0.9.13.3:
[sbcl.git] / src / runtime / x86-arch.c
index 9d76b93..c3f9268 100644 (file)
@@ -224,7 +224,7 @@ sigtrap_handler(int signal, siginfo_t *info, void *void_context)
         *(single_stepping-2) = single_step_save2;
         *(single_stepping-1) = single_step_save3;
 #else
-        *context_eflags_addr(context) ^= 0x100;
+        *context_eflags_addr(context) &= ~0x100;
 #endif
         /* Re-install the breakpoint if possible. */
         if (*os_context_pc_addr(context) == (int)single_stepping + 1) {
@@ -254,6 +254,18 @@ sigtrap_handler(int signal, siginfo_t *info, void *void_context)
     os_restore_fp_control(context);
 #endif
 
+
+#ifdef LISP_FEATURE_SUNOS
+    /* For some reason the breakpoints that :ENCAPSULATE NIL tracing sets up
+     * cause a trace trap (i.e. processor single-stepping trap) on the following
+     * instruction on Solaris 10/x86. -- JES, 2006-04-07
+     */
+    if (info->si_code == TRAP_TRACE) {
+        lose("foo");
+        return;
+    }
+#endif
+
     /* On entry %eip points just after the INT3 byte and aims at the
      * 'kind' value (eg trap_Cerror). For error-trap and Cerror-trap a
      * number of bytes will follow, the first is the length of the byte