Changeset 678 for trunk/src/kernel32/exceptions.cpp
- Timestamp:
- Aug 25, 1999, 12:28:41 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/exceptions.cpp
r634 r678 1 /* $Id: exceptions.cpp,v 1.1 1 1999-08-22 22:11:21sandervl Exp $ */1 /* $Id: exceptions.cpp,v 1.12 1999-08-25 10:28:40 sandervl Exp $ */ 2 2 3 3 /* … … 56 56 #include "exceptions.h" 57 57 #include "exceptutil.h" 58 #include "misc.h" 58 #include <misc.h> 59 #include "mmap.h" 59 60 60 61 //Global Process Unhandled exception filter … … 873 874 switch(pERepRec->ExceptionNum) 874 875 { 875 876 877 878 879 880 881 882 883 884 885 886 887 888 return (XCPT_CONTINUE_EXECUTION);889 890 891 892 SetExceptionChain((ULONG)0);893 return (XCPT_CONTINUE_SEARCH);876 case XCPT_FLOAT_DENORMAL_OPERAND: 877 case XCPT_FLOAT_DIVIDE_BY_ZERO: 878 case XCPT_FLOAT_INEXACT_RESULT: 879 case XCPT_FLOAT_INVALID_OPERATION: 880 case XCPT_FLOAT_OVERFLOW: 881 case XCPT_FLOAT_STACK_CHECK: 882 case XCPT_FLOAT_UNDERFLOW: 883 dprintf(("KERNEL32: OS2ExceptionHandler: FPU exception, fix and continue\n")); 884 pCtxRec->ctx_env[0] |= 0x1F; 885 pCtxRec->ctx_stack[0].losig = 0; 886 pCtxRec->ctx_stack[0].hisig = 0; 887 pCtxRec->ctx_stack[0].signexp = 0; 888 889 return (XCPT_CONTINUE_EXECUTION); 890 891 case XCPT_PROCESS_TERMINATE: 892 case XCPT_ASYNC_PROCESS_TERMINATE: 893 SetExceptionChain((ULONG)0); 894 return (XCPT_CONTINUE_SEARCH); 894 895 895 896 case XCPT_ACCESS_VIOLATION: 897 { 898 Win32MemMap *map; 899 900 if(pERepRec->ExceptionInfo[1] == 0 && pERepRec->ExceptionInfo[1] == XCPT_DATA_UNKNOWN) { 901 goto continueFail; 902 } 903 map = Win32MemMap::findMap(pERepRec->ExceptionInfo[0]); 904 if(map == NULL) { 905 goto continueFail; 906 } 907 switch(pERepRec->ExceptionInfo[0]) { 908 case XCPT_READ_ACCESS: 909 if(map->hasReadAccess() == FALSE) { 910 goto continueFail; 911 } 912 break; 913 case XCPT_WRITE_ACCESS: 914 if(map->hasWriteAccess() == FALSE) { 915 goto continueFail; 916 } 917 break; 918 case XCPT_EXECUTE_ACCESS: 919 if(map->hasExecuteAccess() == FALSE) { 920 goto continueFail; 921 } 922 break; 923 default: 924 goto continueFail; 925 } 926 //Might want to consider mapping more than one page if access is at 927 //a high offset in the page 928 if(map->commitPage((LPVOID)pERepRec->ExceptionInfo[1], 1) == TRUE) 929 return (XCPT_CONTINUE_EXECUTION); 930 931 //no break; 932 } 933 continueFail: 934 896 935 case XCPT_BREAKPOINT: 897 936 case XCPT_ARRAY_BOUNDS_EXCEEDED: … … 907 946 case XCPT_IN_PAGE_ERROR: 908 947 case XCPT_SIGNAL: 909 dprintf(("KERNEL32: OS2ExceptionHandler: Continue and kill\n"));910 pCtxRec->ctx_RegEip = (ULONG)KillWin32Process;911 pCtxRec->ctx_RegEsp = pCtxRec->ctx_RegEsp + 0x10;912 pCtxRec->ctx_RegEax = pERepRec->ExceptionNum;913 pCtxRec->ctx_RegEbx = pCtxRec->ctx_RegEip;914 return (XCPT_CONTINUE_EXECUTION);948 dprintf(("KERNEL32: OS2ExceptionHandler: Continue and kill\n")); 949 pCtxRec->ctx_RegEip = (ULONG)KillWin32Process; 950 pCtxRec->ctx_RegEsp = pCtxRec->ctx_RegEsp + 0x10; 951 pCtxRec->ctx_RegEax = pERepRec->ExceptionNum; 952 pCtxRec->ctx_RegEbx = pCtxRec->ctx_RegEip; 953 return (XCPT_CONTINUE_EXECUTION); 915 954 916 955 default: //non-continuable exceptions
Note:
See TracChangeset
for help on using the changeset viewer.