- Timestamp:
- Jul 7, 2012, 1:59:15 AM (13 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/exceptions.cpp
r21999 r22004 1119 1119 PEXCEPTIONREGISTRATIONRECORD pERegRec, 1120 1120 PCONTEXTRECORD pCtxRec, 1121 PVOID p) 1121 PVOID p, 1122 BOOL fSEH) 1122 1123 { 1123 1124 char szTrapDump[2048]; … … 1128 1129 #endif 1129 1130 /* now dump the information to the logfile */ 1130 dprintf((" \n%s", szTrapDump));1131 dprintf(("OS2ExceptionHandler: fSEH=%d\n%s", fSEH, szTrapDump)); 1131 1132 } 1132 1133 1133 1134 #else // DEBUG 1134 #define dprintfException(a,b,c,d ) do {} while (0)1135 #define dprintfException(a,b,c,d,e) do {} while (0) 1135 1136 #endif // DEBUG 1136 1137 … … 1321 1322 case XCPT_FLOAT_STACK_CHECK: 1322 1323 case XCPT_FLOAT_UNDERFLOW: 1323 dprintfException(pERepRec, pERegRec, pCtxRec, p );1324 dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1324 1325 dprintf(("KERNEL32: OS2ExceptionHandler (fSEH=%d): FPU exception\n", fSEH)); 1325 1326 if((!fIsOS2Image || fForceWin32TIB || fSEH) && !fExitProcess) //Only for real win32 apps or when forced … … 1344 1345 case XCPT_ASYNC_PROCESS_TERMINATE: 1345 1346 #if 0 1346 dprintfException(pERepRec, pERegRec, pCtxRec, p );1347 dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1347 1348 PrintExceptionChain(); 1348 1349 // fall through … … 1511 1512 if(teb->o.odin.context.ContextFlags) 1512 1513 { 1513 dprintfException(pERepRec, pERegRec, pCtxRec, p );1514 dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1514 1515 1515 1516 //NOTE: This will not work properly in case multiple threads execute this code … … 1582 1583 1583 1584 #if defined(DEBUG) 1584 dprintfException(pERepRec, pERegRec, pCtxRec, p );1585 dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1585 1586 1586 1587 if(!fExitProcess && (pCtxRec->ContextFlags & CONTEXT_CONTROL)) { … … 1765 1766 // @@VP20040507: Isn't this a bit dangerous to call dprintfon such exception 1766 1767 //#ifdef DEBUG 1767 // dprintfException(pERepRec, pERegRec, pCtxRec, p );1768 // dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1768 1769 //#endif 1769 1770 goto continuesearch; … … 1790 1791 1791 1792 case XCPT_SIGNAL_INTR: 1792 dprintfException(pERepRec, pERegRec, pCtxRec, p );1793 dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1793 1794 if (InternalGenerateConsoleCtrlEvent((breakPressed) ? CTRL_BREAK_EVENT : CTRL_C_EVENT, 0)) 1794 1795 { … … 1805 1806 1806 1807 default: //non-continuable exceptions 1807 dprintfException(pERepRec, pERegRec, pCtxRec, p );1808 dprintfException(pERepRec, pERegRec, pCtxRec, p, fSEH); 1808 1809 goto continuesearch; 1809 1810 } -
trunk/src/kernel32/oslibexcept.cpp
r21999 r22004 170 170 if (rc != ExceptionContinueExecution) 171 171 { 172 dprintf(("Win32 exception handler returned %x", rc)); 172 dprintf(("Win32 exception handler returned %s (%d)", 173 rc == ExceptionContinueSearch ? "ExceptionContinueSearch" : 174 "???", rc)); 173 175 return FALSE; 174 176 } 175 177 176 dprintf(("Win32 exception handler returned ExceptionContinueExecution")); 178 dprintf(("Win32 exception handler returned ExceptionContinueExecution (%d)", 179 ExceptionContinueExecution)); 177 180 178 181 if (pWinContextRec->ContextFlags & WINCONTEXT_CONTROL) -
trunk/src/kernel32/seh/sehutil.s
r21999 r22004 154 154 popl %ebp 155 155 156 /* analyze filter result */ 157 movl 20(%ebx), %eax /* pFrame->filterResult */ 158 cmpl $1, %eax /* EXCEPTION_EXECUTE_HANDLER? */ 159 je ___seh_handler_FreeMem 160 cmpl $-1, %eax /* EXCEPTION_CONTINUE_EXECUTION? */ 161 jne 1f 162 movl $0, %eax /* ExceptionContinueExecution */ 163 jmp 2f 164 1: 165 /* Assume EXCEPTION_CONTIUNE_SEARCH */ 166 movl $1, %eax /* ExceptionContinueSearch */ 167 2: 168 169 /* convert Win32 exception info back to OS/2 */ 170 pushl 16(%ebp) /* pContext */ 171 pushl 48(%ebx) /* pFrame->Pointers.ContextRecord */ 172 pushl %eax /* rc */ 173 call OSLibConvertExceptionResult 174 addl $12, %esp 175 pushl %eax /* save result */ 176 177 ___seh_handler_FreeMem: 178 156 179 /* free heap block */ 157 180 movl 16(%ebx), %eax /* pFrame->pHandlerContext */ … … 161 184 addl $4, %esp 162 185 163 /* analyze filter result */186 /* analyze filter result again */ 164 187 movl 20(%ebx), %eax /* pFrame->filterResult */ 165 188 cmpl $1, %eax /* EXCEPTION_EXECUTE_HANDLER? */ 166 189 je ___seh_handler_Unwind 167 cmpl $-1, %eax /* EXCEPTION_CONTINUE_EXECUTION? */ 168 jne 1f 190 191 popl %eax /* restore OSLibConvertExceptionResult result */ 192 193 /* %eax already contains TRUE if the execution should continue 194 * and FALSE otherwise */ 195 cmp $0, %eax /* FALSE (= continue search)? */ 196 je 1f 169 197 movl $0, 52(%ebx) /* pFrame->state */ 170 //movl $-1, %eax /* XCPT_CONTINUE_EXECUTION (-1) */ 171 movl $1, %eax 198 movl $1, %eax /* TRUE */ 172 199 jmp ___seh_handler_Return 173 200 1: 174 /* assume EXCEPTION_CONTINUE_SEARCH (0) */ 175 xorl %eax, %eax /* return XCPT_CONTINUE_SEARCH (0) */ 201 xorl %eax, %eax /* FALSE */ 176 202 jmp ___seh_handler_Return 177 203
Note:
See TracChangeset
for help on using the changeset viewer.