News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Help with debugger

Started by E-man96, June 17, 2010, 08:11:54 AM

Previous topic - Next topic

E-man96

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]

MortenMacFly

Quote from: E-man96 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.
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

E-man96

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.

oBFusCATed

(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!]