static SYSTEM_INFO SystemInfo;
static int logging_started;
static MINIDUMP_TYPE minidumpmode = MiniDumpNormal;
+static int nocrashdump;
static int doquit;
static int console_started;
void *globalipc;
resetgui_pending = true;
return 1;
}
+ if (!_tcscmp(arg, _T("nocrashdump"))) {
+ nocrashdump = 1;
+ return 1;
+ }
if (!np)
return 0;
LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS * pExceptionPointers, DWORD ec)
{
+ if (nocrashdump || isfullscreen() > 0)
+ EXCEPTION_CONTINUE_SEARCH;
write_log (_T("EVALEXCEPTION %08x!\n"), ec);
create_dump (pExceptionPointers);
return EXCEPTION_CONTINUE_SEARCH;
LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointers, DWORD ec)
{
+ if (nocrashdump)
+ EXCEPTION_CONTINUE_SEARCH;
+
static uae_u8 *prevpc;
LONG lRet = EXCEPTION_CONTINUE_SEARCH;
PEXCEPTION_RECORD er = pExceptionPointers->ExceptionRecord;
int has_retval = (trap->flags & TRAPFLAG_NO_RETVAL) == 0;
int implicit_rts = (trap->flags & TRAPFLAG_DORET) != 0;
- if (trap->name && trap->name[0] != 0 && trace_traps)
- write_log (_T("TRAP: %s\n"), trap->name);
-
if (trap_num < trap_count) {
if (trap->flags & TRAPFLAG_EXTRA_STACK) {
/* Handle an extended trap.
* space via a separate, dedicated simple trap which the trap
* handler causes to be invoked when it is done.
*/
+
+ if (trap->name && trap->name[0] != 0 && trace_traps)
+ write_log(_T("XTRAP: %s\n"), trap->name);
+
trap_HandleExtendedTrap (trap->handler, has_retval);
} else {
/* Handle simple trap */
+
+ if (trap->name && trap->name[0] != 0 && trace_traps)
+ write_log(_T("TRAP: %s\n"), trap->name);
+
retval = (trap->handler) (NULL);
if (has_retval)
* It'll do this when the trap handler is done - or when
* the handler wants to call 68k code. */
uae_sem_wait(&context->switch_to_emu_sem);
+
+ if (trace_traps) {
+ write_log(_T("Exit extended trap PC=%08x\n"), m68k_getpc());
+ }
}
}
m68k_setpc(m68k_call_trapaddr);
fill_prefetch();
+ if (trace_traps) {
+ write_log(_T("Calling m68k PC=%08x %08x\n"), func_addr, m68k_call_trapaddr);
+ }
+
/* Switch to emulator context. */
uae_sem_post(&ctx->switch_to_emu_sem);
m68k_setpc(context->call68k_func_addr);
fill_prefetch();
- /* End critical section: allow other traps run. */
- uae_sem_post(&trap_mutex);
-
/* Restore interrupts. */
regs.intmask = context->saved_regs.intmask;
+ /* End critical section: allow other traps run. */
+ uae_sem_post(&trap_mutex);
+
/* Dummy return value. */
return 0;
}
TrapContext *context;
uae_u32 sp;
+ if (trace_traps) {
+ write_log(_T("m68k_return_handler\n"));
+ }
+
+
/* One trap returning at a time, please! */
uae_sem_wait(&trap_mutex);
{
TrapContext *context = current_context;
+ if (trace_traps) {
+ write_log(_T("exit_trap_handler waiting PC=%08x\n"), context->saved_regs.pc);
+ }
+
/* Wait for trap context thread to exit. */
uae_wait_thread(context->thread);