--- BasiliskII/src/Windows/main_windows.cpp 2007/01/13 18:21:30 1.11 +++ BasiliskII/src/Windows/main_windows.cpp 2008/01/01 09:40:33 1.13 @@ -1,7 +1,7 @@ /* * main_windows.cpp - Startup code for Windows * - * Basilisk II (C) 1997-2005 Christian Bauer + * Basilisk II (C) 1997-2008 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -141,12 +141,13 @@ void *vm_acquire_mac(size_t size) * SIGSEGV handler */ -static sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction) +static sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip) { + const uintptr fault_address = (uintptr)sigsegv_get_fault_address(sip); #if ENABLE_VOSF // Handle screen fault - extern bool Screen_fault_handler(sigsegv_address_t, sigsegv_address_t); - if (Screen_fault_handler(fault_address, fault_instruction)) + extern bool Screen_fault_handler(sigsegv_info_t *sip); + if (Screen_fault_handler(sip)) return SIGSEGV_RETURN_SUCCESS; #endif @@ -167,10 +168,12 @@ static sigsegv_return_t sigsegv_handler( * Dump state when everything went wrong after a SEGV */ -static void sigsegv_dump_state(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction) +static void sigsegv_dump_state(sigsegv_info_t *sip) { + const sigsegv_address_t fault_address = sigsegv_get_fault_address(sip); + const sigsegv_address_t fault_instruction = sigsegv_get_fault_instruction_address(sip); fprintf(stderr, "Caught SIGSEGV at address %p", fault_address); - if (fault_instruction != SIGSEGV_INVALID_PC) + if (fault_instruction != SIGSEGV_INVALID_ADDRESS) fprintf(stderr, " [IP=%p]", fault_instruction); fprintf(stderr, "\n"); uaecptr nextpc;