Ignore:
Timestamp:
Jul 5, 2010, 2:30:14 AM (15 years ago)
Author:
dmik
Message:

Implemented compiler-level SEH (try/catch) support for GCC.

File:
1 edited

Legend:

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

    r21339 r21381  
    7878BOOL    fSwitchTIBSel = TRUE;           // TRUE  -> switch TIB selectors
    7979                                        // FALSE -> don't
     80BOOL    fSEHEnabled = FALSE;            // TRUE  -> SEH support enabled
     81                                        // FALSE -> not enabled
    8082BOOL    fExitProcess = FALSE;
    8183
     
    105107
    106108
     109//******************************************************************************
     110//******************************************************************************
     111VOID WIN32API EnableSEH()
     112{
     113    if(!fSEHEnabled) {
     114        ODIN_SetTIBSwitch(TRUE);
     115        fSEHEnabled = TRUE;
     116    }
     117    return;
     118}
    107119//******************************************************************************
    108120//******************************************************************************
     
    494506{
    495507    dprintf(("ODIN_SetTIBSwitch %d", fSwitchTIB));
    496     fSwitchTIBSel = fSwitchTIB;
    497     if(fSwitchTIBSel) {
    498          SetWin32TIB();
    499     }
    500     else RestoreOS2TIB();
     508    if (!fSEHEnabled) {
     509        fSwitchTIBSel = fSwitchTIB;
     510        if(fSwitchTIBSel) {
     511             SetWin32TIB();
     512        }
     513        else RestoreOS2TIB();
     514    } else {
     515        dprintf(("ODIN_SetTIBSwitch: ignored due to fSEHEnabled = TRUE"));
     516    }
    501517}
    502518//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.