Author Topic: Help with debugger  (Read 4466 times)

Offline E-man96

  • Single posting newcomer
  • *
  • Posts: 2
Help with debugger
« on: June 17, 2010, 08:11:54 am »
My program compiles fine, but when I try to run the debugger I get nothing, just a blank console. When I try to move to a next step, the console exits, bypassing all I have coded. It tells me "The program is not being run" but I don't know how to "run" the program.
If your interested in the code it is somewhere here. (I've made it from cpp to txt)
I have Ubuntu linux, codeblocks version 8.02, g++, gdb.

[attachment deleted by admin]
« Last Edit: June 17, 2010, 08:15:51 am by E-man96 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Help with debugger
« Reply #1 on: June 17, 2010, 01:21:27 pm »
My program compiles fine, but when I try to run the debugger I get nothing, just a blank console. When I try to move to a next step, the console exits, bypassing all I have coded. It tells me "The program is not being run" but I don't know how to "run" the program.
If your interested in the code it is somewhere here. (I've made it from cpp to txt)
I have Ubuntu linux, codeblocks version 8.02, g++, gdb.
Most likely you forgot to enable producing debugging symbols or you have stripped them. Verify that the compiler options "-g" is on and "-s" (as well as ALL optimisations) is off.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline E-man96

  • Single posting newcomer
  • *
  • Posts: 2
Re: Help with debugger
« Reply #2 on: June 17, 2010, 10:41:07 pm »
Well that's the thing, I have -g checked and nothing else checked (including -s).
Also, it turns out the program can be run from the debug console but it behaves weirdly. Because when I press:

"Debug/continue"
it runs the program but it has no control (ignores breakpoints and goes through everything as if it was being compiled) ,and it gives me in the console in which the program is being run in "warning: GDB: Failed to set controlling terminal: operation not permitted"

"run to crusor"      
the same effect as above

"next line"
It gives me in the debugger log "The program is not being run"

"next instruction"
the same effect as above

"step into"
the same effect as above

"step out"
It doesn't do anything at all.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
(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!]