Changeset 21916 for trunk/src/kernel32/exceptutil.asm
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/kernel32/exceptutil.asm
r10409 r21916 33 33 34 34 CODE32 SEGMENT DWORD PUBLIC USE32 'CODE' 35 36 35 37 public _RaiseException@16 36 extrn OS2RAISEEXCEPTION: near38 extrn _OS2RaiseException : near 37 39 38 40 _RaiseException@16 proc near 39 push dword ptr [esp+4] ;DWORD dwExceptionCode 40 push dword ptr [esp+12] ;DWORD dwExceptionFlags 41 push dword ptr [esp+20] ;DWORD cArguments 42 push dword ptr [esp+28] ;DWORD *lpArguments 43 push dword ptr [esp+16] ;return address 44 push esp 45 add dword ptr [esp], 20 41 42 ; _OS2RaiseException is _cdecl 43 46 44 push ebp 45 mov ebp, esp 46 push eax 47 48 mov eax, 0 49 mov eax, ss 50 push eax 51 mov eax, gs 52 push eax 53 mov eax, fs 54 push eax 55 mov eax, es 56 push eax 57 mov eax, ds 58 push eax 59 mov eax, cs 60 push cs 61 push esi 62 push edi 63 push edx 64 push ecx 65 push ebx 66 push dword ptr [ebp-4] ; original eax 47 67 pushfd 48 push eax 68 push dword ptr [ebp] ; original ebp 69 push ebp 70 add dword ptr [esp], 4 ; original esp 71 push dword ptr [ebp + 4] ; original eip (return address) 72 73 push dword ptr [ebp + 20] ; arg 4 (DWORD *lpArguments) 74 push dword ptr [ebp + 16] ; arg 3 (DWORD cArguments) 75 push dword ptr [ebp + 12] ; arg 2 (DWORD dwExceptionFlags) 76 push dword ptr [ebp + 8] ; arg 1 (DWORD dwExceptionCode) 77 78 call _OS2RaiseException 79 80 add esp, 20 * 4 81 82 pop eax 83 pop ebp 84 85 ret 16 ;__stdcall 86 87 _RaiseException@16 endp 88 89 90 public _RtlUnwind@16 91 extrn _OS2RtlUnwind : near 92 93 _RtlUnwind@16 proc near 94 95 ; OS2RtlUnwind is _cdecl 96 97 push ebp 98 mov ebp, esp 99 push eax 100 101 mov eax, 0 102 mov eax, ss 103 push eax 104 mov eax, gs 105 push eax 106 mov eax, fs 107 push eax 108 mov eax, es 109 push eax 110 mov eax, ds 111 push eax 112 mov eax, cs 113 push cs 114 push esi 115 push edi 116 push edx 117 push ecx 49 118 push ebx 50 push ecx51 push edx52 push edi53 push e si54 xor eax, eax55 mov eax, cs56 push eax 57 mov eax, ds58 push eax59 mov eax, es60 push eax61 mov eax, fs 62 push eax63 mov eax, gs 64 push eax65 mov eax, ss 66 p usheax67 call OS2RAISEEXCEPTION119 push dword ptr [ebp-4] ; original eax 120 pushfd 121 push dword ptr [ebp] ; original ebp 122 push ebp 123 add dword ptr [esp], 4 ; original esp 124 push dword ptr [ebp + 4] ; original eip (return address) 125 126 push dword ptr [ebp + 20] ; arg 4 (DWORD returnEax) 127 push dword ptr [ebp + 16] ; arg 3 (PWINEXCEPTION_RECORD pRecord) 128 push dword ptr [ebp + 12] ; arg 2 (LPVOID unusedEip) 129 push dword ptr [ebp + 8] ; arg 1 (PWINEXCEPTION_FRAME pEndFrame) 130 131 call _OS2RtlUnwind 132 133 add esp, 20 * 4 134 135 pop eax 136 pop ebp 68 137 69 138 ret 16 ;__stdcall 70 _RaiseException@16 endp 71 72 public _RtlUnwind@16 73 extrn OS2RTLUNWIND : near 74 75 _RtlUnwind@16 proc near 76 push dword ptr [esp+4] ;PWINEXCEPTION_FRAME pEndFrame 77 push dword ptr [esp+12] ;LPVOID unusedEip 78 push dword ptr [esp+20] ;PWINEXCEPTION_RECORD pRecord 79 push dword ptr [esp+28] ;DWORD returnEax 80 push dword ptr [esp+16] ;return address 81 push esp 82 add dword ptr [esp], 20 83 push ebp 84 pushfd 85 push eax 86 push ebx 87 push ecx 88 push edx 89 push edi 90 push esi 91 xor eax, eax 92 mov eax, cs 93 push eax 94 mov eax, ds 95 push eax 96 mov eax, es 97 push eax 98 mov eax, fs 99 push eax 100 mov eax, gs 101 push eax 102 mov eax, ss 103 push eax 104 call OS2RTLUNWIND 105 106 ret 16 ;__stdcall 139 107 140 _RtlUnwind@16 endp 108 141 … … 118 151 OS2ExceptionHandler endp 119 152 120 PUBLIC QueryExceptionChain121 122 QueryExceptionChain proc near153 PUBLIC _QueryExceptionChain 154 155 _QueryExceptionChain proc near 123 156 mov eax, fs:[0] 124 157 ret 125 QueryExceptionChain endp158 _QueryExceptionChain endp 126 159 127 160 PUBLIC GetExceptionRecord … … 279 312 _CallEntryPoint endp 280 313 281 282 ; 281 static DWORD EXC_CallHandler( WINEXCEPTION_RECORD *record, WINEXCEPTION_FRAME *frame, 314 ifndef __EMX__ 315 283 316 EXTRN WriteLog:PROC 284 317 EXTRN _GetThreadTEB@0:PROC 285 318 IFDEF DEBUG 286 EXTRN DbgEnabledKERNEL32:DWORD319 EXTRN _DbgEnabledKERNEL32:DWORD 287 320 ENDIF 288 321 289 EXC_push_frame__FP19_WINEXCEPTION_FRAME proc 322 ; 129 static inline WINEXCEPTION_FRAME * EXC_push_frame( WINEXCEPTION_FRAME *frame ) 323 align 04h 324 325 EXC_push_frame proc 290 326 push ebp 291 327 mov ebp,esp … … 313 349 leave 314 350 ret 315 EXC_push_frame __FP19_WINEXCEPTION_FRAMEendp351 EXC_push_frame endp 316 352 317 353 ; 138 static inline WINEXCEPTION_FRAME * EXC_pop_frame( WINEXCEPTION_FRAME *frame ) 318 354 align 04h 319 355 320 EXC_pop_frame __FP19_WINEXCEPTION_FRAMEproc356 EXC_pop_frame proc 321 357 push ebp 322 358 mov ebp,esp … … 339 375 leave 340 376 ret 341 EXC_pop_frame__FP19_WINEXCEPTION_FRAME endp 342 377 EXC_pop_frame endp 378 379 ; 281 static extern "C" DWORD EXC_CallHandler( WINEXCEPTION_RECORD *record, WINEXCEPTION_FRAME *frame, 343 380 align 04h 344 PUBLIC EXC_CallHandler__FP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPP19_WINEXCEPTION_FRAMEPFP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPv_UlT5345 346 EXC_CallHandler__FP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPP19_WINEXCEPTION_FRAMEPFP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPv_UlT5proc381 PUBLIC _EXC_CallHandler 382 383 _EXC_CallHandler proc 347 384 push ebp 348 385 mov ebp,esp … … 363 400 ; 298 EXC_push_frame( &newframe.frame ); 364 401 lea eax,[ebp-0ch]; newframe 365 call EXC_push_frame __FP19_WINEXCEPTION_FRAME402 call EXC_push_frame 366 403 367 404 ; 299 dprintf(("KERNEL32: Calling handler at %p code=%lx flags=%lx\n", 368 405 IFDEF DEBUG 369 cmp word ptr DbgEnabledKERNEL32+020h,01h406 cmp word ptr _DbgEnabledKERNEL32+020h,01h 370 407 jne @BLBL20 371 408 mov eax,[ebp+08h]; record … … 392 429 IFDEF DEBUG 393 430 ; 302 dprintf(("KERNEL32: Handler returned %lx\n", ret)); 394 cmp word ptr DbgEnabledKERNEL32+020h,01h431 cmp word ptr _DbgEnabledKERNEL32+020h,01h 395 432 jne @BLBL21 396 433 push dword ptr [ebp-010h]; ret … … 403 440 ; 303 EXC_pop_frame( &newframe.frame ); 404 441 lea eax,[ebp-0ch]; newframe 405 call EXC_pop_frame __FP19_WINEXCEPTION_FRAME442 call EXC_pop_frame 406 443 407 444 ; 304 return ret; … … 410 447 leave 411 448 ret 412 EXC_CallHandler__FP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPP19_WINEXCEPTION_FRAMEPFP20_WINEXCEPTION_RECORDP19_WINEXCEPTION_FRAMEP10WINCONTEXTPv_UlT5 endp 449 _EXC_CallHandler endp 450 451 endif ; ifndef __EMX__ 413 452 414 453 CODE32 ENDS
Note:
See TracChangeset
for help on using the changeset viewer.