I am using Windows 10. I wrote a HelloWorld program in C.
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
I compiled this with cmd with the following command
gcc -g -o HelloWorld HelloWorld.c
In gdb, I write start. And I typed step quite a few times. At some point it prints
(gdb) step
7 }
Then I typed step again. It prints
(gdb) step
__tmainCRTStartup () at C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crtexe.c:334
334 C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crtexe.c: No such file or directory.
After another step it prints
332 in C:/crossdev/src/mingw-w64-v4-git/mingw-w64-crt/crt/crtexe.c
After that it prints above line every time I wrote step. And eventually sometime it printed
[Thread 1952.0x1628 exited with code 0]
[Inferior 1 (process 1952) exited normally]
I want to know, what I have done wrong that causes the problem.