OllyDbg can't debug visual studio exe

此生再无相见时 提交于 2019-12-08 02:05:33

问题


I've just created a new vc++ exe with this simple code:

#include<stdio.h>
#include<string.h>
#include<windows.h>

int ExceptionHandler(void);
int main(int argc,char *argv[]){

char temp[512];

printf("Application launched");

try 
{

  throw "error";

} 
catch (... )
{
    ExceptionHandler();
}
return 0;
}
int ExceptionHandler(void)
{
    printf("Exception");
    return 0;
}

The app is extremely simple, and an exe file depending on kernel32.dll and MSVCR100D.dll is created.

When I try to import and debug it into OllyDbg (I just wanted to see the SEH chain in the stack window) it says "Module 'testseh' has entry point outside the code (as specified in the PE header). Maybe this file is self-extracting or self-modifying. Please keep it in mind when setting breakpoints!" and no code is executed, it jumps directly to the ntdll.dll crash part (in fact the exe is crashing but I can't step by step the printf instructions)

How come this behaviour? The exe doesn't rely on CLI neither CLR, am I missing something?


回答1:


Compiler exceptions taken from olly as critical (wrong settings)



来源:https://stackoverflow.com/questions/5779390/ollydbg-cant-debug-visual-studio-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!