Author Topic: Program exited with code 03  (Read 9473 times)

Offline buaawangjun

  • Single posting newcomer
  • *
  • Posts: 2
Program exited with code 03
« on: July 15, 2011, 03:41:33 pm »
Hello everyone,

I try to debug a console application, and it can be compiled and linked successfully,
but when it starts to run in debug mode,
the console window will be open and closed quickly.
And then the application exits with the following print:
"Debugger name and version: GNU gdb 6.8.
Child process PID: 3968.
Program exited with code 03.
Debugger finished with status 0"

I try to set break point in the 1st line in main function,
but it can be broken at the point,
seems that main function cannot be excuted in the whole process.

The project seems to be OK, and can be debugged sucessfully in others PC (WinXP).
Even before, it was OK and can be debugged in my PC (WinXP).

I don't know what is happened about this issue.
Thank all of you.


Offline buaawangjun

  • Single posting newcomer
  • *
  • Posts: 2
Re: Program exited with code 03
« Reply #1 on: July 17, 2011, 07:56:10 am »
Anybody who can help me ?
Thanks a lot.

Offline Freem

  • Almost regular
  • **
  • Posts: 218
Re: Program exited with code 03
« Reply #2 on: July 18, 2011, 10:24:03 am »
Did you compile it with the debug target?

If yes, I can suggest you to verify that flags are correctly set (no optimizations, and set the debug option (don't remember what is it exactly, but it's really explicit) in you project.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Program exited with code 03
« Reply #3 on: July 18, 2011, 06:36:35 pm »
Please read this: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
You can update your GDB, newer GDB sometimes work better.
Also try to debug the program using GDB from the command line, thus you can pinpoint if the problem is in GDB or C::B.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]