X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fwin32-os.c;h=32ff6d054be4355cb8144c0b21de1348572b3283;hb=1f03c7f326823245708a84af86b31ac72bdb1742;hp=e4620f8ea9c6e69c40f99e783952a5f91c405286;hpb=45b5a21316381ecab98a0e5a5296294e044170e8;p=sbcl.git diff --git a/src/runtime/win32-os.c b/src/runtime/win32-os.c index e4620f8..32ff6d0 100644 --- a/src/runtime/win32-os.c +++ b/src/runtime/win32-os.c @@ -51,16 +51,6 @@ #include #include -/* KLUDGE: Avoid double definition of boolean by rpcndr.h included via - * shlobj.h. - * - * FIXME: We should probably arrange to use the rpcndr.h boolean on Windows, - * or get rid of our own boolean type. - */ -#define boolean rpcndr_boolean -#include -#undef boolean - #include #include @@ -305,10 +295,6 @@ is_valid_lisp_addr(os_vm_address_t addr) return 0; } -/* - * any OS-dependent special low-level handling for signals - */ - /* A tiny bit of interrupt.c state we want our paws on. */ extern boolean internal_errors_enabled; @@ -345,17 +331,19 @@ handle_exception(EXCEPTION_RECORD *exception_record, } if (exception_record->ExceptionCode == EXCEPTION_BREAKPOINT) { - /* Pick off sigtrap case first. */ - - extern void sigtrap_handler(int signal, siginfo_t *info, void *context); - /* - * Unlike some other operating systems, Win32 leaves EIP - * pointing to the breakpoint instruction. - */ + unsigned char trap; + /* This is just for info in case the monitor wants to print an + * approximation. */ + current_control_stack_pointer = + (lispobj *)*os_context_sp_addr(context); + /* Unlike some other operating systems, Win32 leaves EIP + * pointing to the breakpoint instruction. */ context->Eip++; - - sigtrap_handler(0, NULL, context); - + /* Now EIP points just after the INT3 byte and aims at the + * 'kind' value (eg trap_Cerror). */ + trap = *(unsigned char *)(*os_context_pc_addr(context)); + handle_trap(context, trap); + /* Done, we're good to go! */ return ExceptionContinueExecution; } else if (exception_record->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && @@ -430,7 +418,7 @@ handle_exception(EXCEPTION_RECORD *exception_record, _clearfp(); /* Call into lisp to handle things. */ - funcall2(SymbolFunction(HANDLE_WIN32_EXCEPTION), context_sap, + funcall2(StaticSymbolFunction(HANDLE_WIN32_EXCEPTION), context_sap, exception_record_sap); /* If Lisp doesn't nlx, we need to put things back. */ @@ -457,7 +445,7 @@ handle_exception(EXCEPTION_RECORD *exception_record, fflush(stderr); fake_foreign_function_call(context); - lose("fake_foreign_function_call fell through"); + lose("Exception too early in cold init, cannot continue."); /* FIXME: WTF? How are we supposed to end up here? */ return ExceptionContinueSearch; @@ -552,14 +540,9 @@ void scratch(void) _get_osfhandle(0); _pipe(0,0,0); access(0,0); - acos(0); - asin(0); close(0); - cosh(0); dup(0); - hypot(0, 0); isatty(0); - sinh(0); strerror(42); write(0, 0, 0); RtlUnwind(0, 0, 0, 0);