Example #1
0
LONG __stdcall exception_filter(EXCEPTION_POINTERS* exceptionPtrs)
{
    LONG returnCode = EXCEPTION_CONTINUE_SEARCH;
    
    // Ignore multiple calls.
    if (s_inFilter != 0)
        return EXCEPTION_CONTINUE_EXECUTION;
    s_inFilter = 1;
    
    // Cannot really do much in case of stack overflow, it'll probably bomb soon 
    // anyway.
    if (exceptionPtrs->ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW)
    {
        OutputDebugString("*** FATAL ERROR: EXCEPTION_STACK_OVERFLOW detected!");
    }
    const bool miniDumpOK = WriteMiniDump(exceptionPtrs, s_miniDumpFileName);

    FILE* f = ::fopen(s_reportFileName, "wt");
    WriteHeader(f);
    WriteExceptionInfo(f, exceptionPtrs);
    WriteCallStack(f, exceptionPtrs->ContextRecord);

    WriteEnvironmentInfo(f);
    MemoryStatus memStatus = MemoryStatus::GetCurrent();
    WriteMemoryStatus(f, memStatus);
    WriteRegisters(f, exceptionPtrs);
    WriteBlackBoxMessages(f);

    fprintf(f, (miniDumpOK ? "\nMini dump saved successfully.\n" : "\nFailed to save minidump.\n"));
    ::fclose(f);

    return returnCode;
}
Example #2
0
void ImagerTesterBase::SetupSensor()
{
	if( m_pRegEntries )
	{
		AssertPowered();
		WriteRegisters(m_pRegEntries, m_cRegEntries);
	}

	ConfigureForTestImage(m_iTestPattern);
}
Example #3
0
bool ImagerTesterBase::SensorTest()
{
	if( !m_pRegEntries ) return true;

	printf("+++++ Executing SensorTest +++++\n");

	AssertPowered();
	WriteRegisters(m_pRegEntries, m_cRegEntries);
	DumpRegisters(m_pRegEntries, m_cRegEntries);

	printf("----- SensorTest Complete -----\n");

	return true;
}