Gdb error “Program exited normally”

cdebugginggdb

when i bedug the programme through gdb it is giving error [Thread 0x8003 (LWP 6186) exited] and Program exited normally can any body help me to come out this problem

Best Answer

That is not an error, from gdb's point of view. Your program just finished gracefully, with a return value of 0, and gdb informs you of that.

You might want to set a few breakpoints before starting your program, so you can poke around in whatever you wish to see. The most obvious thing (which may or may not be useful in your case) would be

b main