在Visual Studio debugmode编译的可执行文件:JMP的功能,而不是呼叫直接地址体 [英] In Visual Studio debugmode compiled executable: jmp to function body instead of direct address in call
问题描述
想象这虚假的程序:
void foo ( void )
{
// anything
}
int main ()
{
foo ();
return 0;
}
当在使用Visual Studio调试模式下进行编译,编译器生成某种功能图或然它被称为的。
When compiled in debug mode with Visual Studio, the compiler builds some kind of "function map" or however it is called.
因此,当您例如遵照富()在调试器,或只是尝试通过与放大器检索功能失调;富,你会发现自己在JMP的的名单,它会在你跟随他们再次领先你实际的函数体。
Thus when you for example follow foo () in a debugger, or just try to retrieve the offset of the function via &foo, you find yourself in a "list" of jmp's, which will when you follow them again lead you to the actual function body.
我的问题是:
是否有禁用此单choosen功能,使&放可能性;富地址返回函数体,而不是JMP。 Ofcourse没有禁用调试模式。
My question is: Is there a possibility to disable this for single choosen functions so that &foo returns the address to the function body, not the jmp. Ofcourse without disabling debug mode.
如果没有,这标志启用/禁用这在整个程序?
If not, which flag enables/disables this for the entire program ?
在此先感谢!
编辑用户SIGTERM:
Edit for user SigTerm:
推荐答案
关闭增量链接
您的问题是很多像这样的
<一href=\"http://stackoverflow.com/questions/2485336/address-of-function-is-not-actual-$c$c-address\">Address功能是不现实的code类地址
Your question is a lot like this one Address of function is not actual code address
这篇关于在Visual Studio debugmode编译的可执行文件:JMP的功能,而不是呼叫直接地址体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!