Why does stepping every instruction crashes while launching the program works?

I'm trying to follow the execution instructions of a simple program I compiled with C++ (it calculates some prime numbers then exits) in a debugger (ollydbg) but I have several questions:

  • Why the first instruction isn't the entry point of the "CODE" section? It is different
  • As soon as I "step over" a few instructions the debugger crashes and writes "Single step event at ntdll.someaddress, press shift+F7/F8/F9 to pass the exception to the program" and crashes. If I run the program without stepping the instructions it works fine and the program loads without problems

Why does this happen? This doesn't happen only with my program but with several others (almost every other 32 bit exe in my system)

Answers


If you're running OllyDbg under a 64-bit OS, that I believe you are out of luck, because OllyDbg doesn't support x86-64 Windows, not even as a debugger used to debug 32-bit apps. See this forum thread, it's from 2006, but I don't thing anything has changed since that. What they suggest is using a different debugger, for example the 64-bit version of WinDbg (which is a great debugger).

Why the first instruction isn't the entry point of the "CODE" section? It is different

You can set this in OllyDbg: Options - Debugging options - Events - "Make first pause at". You can start at the "system breakpoint", which is located in ntdll and is called even before the starting module's entry point is called.


Need Your Help

java.lang.NoSuchMethodError: net.sf.json.JSONObject.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object

eclipse json jboss put

After some time to work with eclipse, jboss and json I get this library json-lib-0.9.jar and added to jboss library so here the problem is that when I run the program I get

Facebook Chat API - Python App Engine

python facebook google-app-engine xmpp facebook-chat

I'm trying to use the Facebook chat API in my web service(AppEngine Python). I found some code on line, but any of them help me to make it work.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.