Ignore:
Timestamp:
Jul 7, 2012, 1:59:15 AM (13 years ago)
Author:
dmik
Message:

kernel32: Pick up register changes in try/except filter.

This is a regression of r21999. Fixes endless exceptions eventually
leading to program termination.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/exceptions.cpp

    r21999 r22004  
    11191119                             PEXCEPTIONREGISTRATIONRECORD pERegRec,
    11201120                             PCONTEXTRECORD               pCtxRec,
    1121                              PVOID                        p)
     1121                             PVOID                        p,
     1122                             BOOL                         fSEH)
    11221123{
    11231124    char szTrapDump[2048];
     
    11281129#endif
    11291130    /* now dump the information to the logfile */
    1130     dprintf(("\n%s", szTrapDump));
     1131    dprintf(("OS2ExceptionHandler: fSEH=%d\n%s", fSEH, szTrapDump));
    11311132}
    11321133
    11331134#else // DEBUG
    1134 #define dprintfException(a,b,c,d) do {} while (0)
     1135#define dprintfException(a,b,c,d,e) do {} while (0)
    11351136#endif // DEBUG
    11361137
     
    13211322    case XCPT_FLOAT_STACK_CHECK:
    13221323    case XCPT_FLOAT_UNDERFLOW:
    1323         dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1324        dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    13241325        dprintf(("KERNEL32: OS2ExceptionHandler (fSEH=%d): FPU exception\n", fSEH));
    13251326        if((!fIsOS2Image || fForceWin32TIB || fSEH) && !fExitProcess)  //Only for real win32 apps or when forced
     
    13441345    case XCPT_ASYNC_PROCESS_TERMINATE:
    13451346#if 0
    1346         dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1347        dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    13471348        PrintExceptionChain();
    13481349        // fall through
     
    15111512            if(teb->o.odin.context.ContextFlags)
    15121513            {
    1513                 dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1514                dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    15141515
    15151516                //NOTE: This will not work properly in case multiple threads execute this code
     
    15821583
    15831584#if defined(DEBUG)
    1584         dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1585        dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    15851586
    15861587        if(!fExitProcess && (pCtxRec->ContextFlags & CONTEXT_CONTROL)) {
     
    17651766// @@VP20040507: Isn't this a bit dangerous to call dprintfon such exception
    17661767//#ifdef DEBUG
    1767 //        dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1768//        dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    17681769//#endif
    17691770        goto continuesearch;
     
    17901791
    17911792            case XCPT_SIGNAL_INTR:
    1792                 dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1793                dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    17931794                if (InternalGenerateConsoleCtrlEvent((breakPressed) ? CTRL_BREAK_EVENT : CTRL_C_EVENT, 0))
    17941795                {
     
    18051806
    18061807    default: //non-continuable exceptions
    1807         dprintfException(pERepRec, pERegRec, pCtxRec, p);
     1808        dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH);
    18081809        goto continuesearch;
    18091810    }
Note: See TracChangeset for help on using the changeset viewer.