+ /* trace trap */
+ case T_TRCTRAP: {
+#ifdef DDB
+ /* Make sure nobody is single stepping into kernel land.
+ * The syscall has to turn off the trace bit itself. The
+ * easiest way, is to simply not call the debugger, until
+ * we are through the problematic "osyscall" stub. This
+ * is a hack, but it does seem to work.
+ */
+ extern int Xosyscall, Xosyscall_end;
+
+ if (frame.tf_eip >= (int)&Xosyscall &&
+ frame.tf_eip <= (int)&Xosyscall_end)
+ return;
+#else
+ return; /* Just return if no DDB */
+#endif
+ }
+ /* FALLTHROUGH */
+
default:
we_re_toast:
#ifdef DDB
@@ -456,13 +476,6 @@
trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv);
break;
}
-
-#ifndef DDB
- /* XXX need to deal with this when DDB is present, too */
- case T_TRCTRAP: /* kernel trace trap; someone single stepping lcall's */
- /* syscall has to turn off the trace bit itself */
- return;
-#endif
case T_BPTFLT|T_USER: /* bpt instruction fault */
sv.sival_int = rcr2();