Exemple #1
0
void wxStackWalker::WalkFromException()
{
    extern EXCEPTION_POINTERS *wxGlobalSEInformation;

    wxCHECK_RET( wxGlobalSEInformation,
                 _T("wxStackWalker::WalkFromException() can only be called from wxApp::OnFatalException()") );

    // don't skip any frames, the first one is where we crashed
    WalkFrom(wxGlobalSEInformation, 0);
}
Exemple #2
0
void wxStackWalker::WalkFromException()
{
// PCSX2 : Added wxUSE_ON_FATAL_EXCEPTION check, which was missing. --air
#if wxUSE_ON_FATAL_EXCEPTION
    extern EXCEPTION_POINTERS *wxGlobalSEInformation;

    wxCHECK_RET( wxGlobalSEInformation,
                 _T("wxStackWalker::WalkFromException() can only be called from wxApp::OnFatalException()") );

    // don't skip any frames, the first one is where we crashed
    WalkFrom(wxGlobalSEInformation, 0);
#endif
}
Exemple #3
0
void wxStackWalker::WalkFromException()
{
    // wxGlobalSEInformation is unavailable if wxUSE_ON_FATAL_EXCEPTION==0
#if wxUSE_ON_FATAL_EXCEPTION
    extern EXCEPTION_POINTERS *wxGlobalSEInformation;

    wxCHECK_RET( wxGlobalSEInformation,
                 _T("wxStackWalker::WalkFromException() can only be called from wxApp::OnFatalException()") );

    // don't skip any frames, the first one is where we crashed
    WalkFrom(wxGlobalSEInformation, 0);
#endif // wxUSE_ON_FATAL_EXCEPTION
}
Exemple #4
0
void wxStackWalker::WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip)
{
    WalkFrom(ep->ContextRecord, skip);
}
Exemple #5
0
}

void wxStackWalker::Walk(size_t skip, size_t WXUNUSED(maxDepth))
{
    // to get a CONTEXT for the current location, simply force an exception and
    // get EXCEPTION_POINTERS from it
    //
    // note:
    //  1. we additionally skip RaiseException() and WalkFromException() frames
    //  2. explicit cast to EXCEPTION_POINTERS is needed with VC7.1 even if it
    //     shouldn't have been according to the docs
    __try
    {
        RaiseException(0x1976, 0, 0, NULL);
    }
    __except( WalkFrom((EXCEPTION_POINTERS *)GetExceptionInformation(),
                       skip + 2), EXCEPTION_CONTINUE_EXECUTION )
    {
        // never executed because of WalkFromException() return value
    }
}

#else // !wxUSE_DBGHELP

// ============================================================================
// stubs
// ============================================================================

// ----------------------------------------------------------------------------
// wxStackFrame
// ----------------------------------------------------------------------------