- Timestamp:
- Aug 27, 2010, 1:54:20 PM (15 years ago)
- Location:
- trunk/src/kernel32/seh
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/seh/makefile
r21427 r21431 29 29 # 30 30 OBJS = \ 31 $(OBJDIR)\seh.obj \32 31 $(OBJDIR)\sehutil.obj 33 32 -
trunk/src/kernel32/seh/sehutil.s
r21427 r21431 62 62 movl %ecx, 4(%esp) /* save length */ 63 63 64 /* check that EXCEPTION_RECORD and CONTEXT are on our stack 65 * and save their offsets in pFrame */ 66 movl 8(%ebp), %eax 67 subl %esp, %eax 68 jl ___seh_handler_Error /* Invalid stack! */ 69 cmpl %ecx, %eax 70 jg ___seh_handler_Error /* Invalid stack! */ 71 movl %eax, 48(%ebx) /* pFrame->Pointers.ExceptionRecord */ 72 73 movl 16(%ebp), %eax 74 subl %esp, %eax 75 jl ___seh_handler_Error /* Invalid stack! */ 76 cmpl %ecx, %eax 77 jg ___seh_handler_Error /* Invalid stack! */ 78 movl %eax, 52(%ebx) /* pFrame->Pointers.ContextRecord */ 79 64 80 /* save the handler's stack on heap */ 65 81 movl %ecx, %eax /* size_t */ … … 76 92 rep movsb 77 93 78 /* prepare a jump to the filter callback */ 79 subl $12, %esp 80 movl 12(%ebp), %ebx 81 movl %ebx, 0(%esp) 82 movl 8(%ebp), %ebx 83 movl %ebx, 4(%esp) 84 movl 16(%ebp), %ebx 85 movl %ebx, 8(%esp) 86 call ___seh_makePointers /* _cdecl, rtl, caller cleans stack */ 87 addl $12, %esp 94 /* correct Pointers offsets to point to the saved stack on heap */ 95 movl 16(%ebx), %eax /* pFrame->pHandlerContext */ 96 addl %eax, 48(%ebx) /* pFrame->Pointers.ExceptionRecord */ 97 addl %eax, 52(%ebx) /* pFrame->Pointers.ContextRecord */ 88 98 89 99 /* restore __try/__catch context */ … … 113 123 popl %ebp 114 124 115 /* free heap blocks */ 116 movl 52(%ebx), %eax /* pFrame->Pointers.ContextRecord */ 117 subl $4, %esp 118 movl %eax, 0(%esp) 119 call odin_free /* _Optlink, rtl, EAX/EDX/ECX-in, caller cleans stack */ 120 addl $4, %esp 121 122 movl 48(%ebx), %eax /* pFrame->Pointers.ExceptionRecord */ 123 subl $4, %esp 124 movl %eax, 0(%esp) 125 call odin_free /* _Optlink, rtl, EAX/EDX/ECX-in, caller cleans stack */ 126 addl $4, %esp 127 125 /* free heap block */ 128 126 movl 16(%ebx), %eax /* pFrame->pHandlerContext */ 129 127 subl $4, %esp
Note:
See TracChangeset
for help on using the changeset viewer.