Topic created on: November 8, 2011 02:22 CST by pank4j .
I'm trying to debug a program which apparently escapes the step in thing in windbg.
Its is a hello world program, which prints "hi" if no command line arguments are passed to it, and "hello" otherwise. The program is compiled with gcc that is shipped with Dev-C++.
Steps to reproduce the problem:
1. Load test4.exe in windbg.
2. Put a breakpoint at 7789fbc8 (bu 7789fbc8).
3. Let it run and hit the breakpoint (g).
4. Once it hits the breakpoint, remove the breakpoint (bc *).
5. Step in a few instructions till it reaches 778901c4 (mov dword ptr [esp+4],eax ss:002b:0028fff4=00401220).
6. Stepping in this instruction runs the program and it prints "hi". This can be confirmed by installing a breakpoint at 401291 which lies in main( ).
A new thread is created just when it executes the instruction at 778901c4. But isn't it supposed to break when stepping in?
How can I intercept it in windbg?
Here's the exe: