![]()
VIP会员
|
在C++中,_EH_prolog对应于try{}catch(){}
.text:77B83264 public _EH_prolog .text:77B83264 _EH_prolog proc near ; CODE XREF: sub_77B82669+5p .text:77B83264 000 push 0FFFFFFFFh ; before the retn instruction, stack is as follows: .text:77B83264 ; .text:77B83264 ; return address .text:77B83264 ; fs:[0] .text:77B83264 ; handler .text:77B83264 ; 0FFFFFFFFh .text:77B83264 ; ebp .text:77B83264 ; .text:77B83264 ; .text:77B83266 004 push eax .text:77B83267 008 mov eax, large fs:0 .text:77B8326D 008 push eax .text:77B8326E 00C mov eax, [esp+12] ; eax = return eip .text:77B83272 00C mov large fs:0, esp .text:77B83279 00C mov [esp+12], ebp ; return eip is overwritten by ebp .text:77B8327D 00C lea ebp, [esp+12] .text:77B83281 00C push eax .text:77B83282 010 retn ; after the retn stack is: .text:77B83282 _EH_prolog endp ;; .text:77B83282 ; fs:[0] .text:77B83282 ; handler .text:77B83282 ; 0FFFFFFFFh .text:77B83282 ; ebp 书中讲的是VC特有的__try{}__except(){}块的结构,描述对应于__SEH_prolog和__SEH_epilog。 .text:77B984C4 __SEH_prolog proc near ; CODE XREF: _wtof+7p .text:77B984C4 ; wcstod+7p ... .text:77B984C4 .text:77B984C4 arg_4 = dword ptr 8 .text:77B984C4 .text:77B984C4 000 push offset _except_handler3 .text:77B984C9 004 mov eax, large fs:0 .text:77B984CF 004 push eax .text:77B984D0 008 mov eax, [esp+8+arg_4] .text:77B984D4 008 mov [esp+8+arg_4], ebp .text:77B984D8 008 lea ebp, [esp+8+arg_4] .text:77B984DC 008 sub esp, eax .text:77B984DE 008 push ebx .text:77B984DF 00C push esi .text:77B984E0 010 push edi .text:77B984E1 014 mov eax, [ebp-8] .text:77B984E4 014 mov [ebp-18h], esp .text:77B984E7 014 push eax .text:77B984E8 018 mov eax, [ebp-4] .text:77B984EB 018 mov dword ptr [ebp-4], 0FFFFFFFFh .text:77B984F2 018 mov [ebp-8], eax .text:77B984F5 018 lea eax, [ebp-10h] .text:77B984F8 018 mov large fs:0, eax .text:77B984FE 018 retn |
VC_EXCRPTION_REGISTRATION结构 异常处理
最新推荐文章于 2024-07-18 15:27:29 发布
