问题描述
我正在逐步完成 Windows 7 中的结构化错误处理恢复代码(例如,在 SEH 处理程序完成并传回CONTINUE"代码后会发生什么).这是一个被调用的函数:
I'm stepping through Structured Error Handling recovery code in Windows 7(e.g, what happens after SEH handler is done and passes back "CONTINUE" code).Here's a function which is called:
7783BD9F mov edi,edi
7783BDA1 push ebp
7783BDA2 mov ebp,esp
7783BDA4 push 1
7783BDA6 push dword ptr [ebp+0Ch]
7783BDA9 push dword ptr [ebp+8]
7783BDAC call 778692DF
7783BDB1 pop ebp
7783BDB2 ret 8
我已经习惯了push ebp/mov ebp,esp"的函数prolog.目的是什么的mov edi,edi"?
I'm used to the function prolog of "push ebp/mov ebp,esp". What's the purposeof the "mov edi,edi"?
推荐答案
Raymond Chen(微软开发人员之一)已经回答了这个确切的问题:
Raymond Chen (one of the Microsoft developers) has answered this exact question:
他还链接了一个更早的参考文献:
And he links an even earlier reference:
基本上,它为热补丁期间插入的跳转指令留出了空间.
Basically, it leaves space for a jump instruction to be inserted during hot patching.
这篇关于Windows32 API:“mov edi,edi"在函数入口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!