User forums > Help
Code::Blocks hangs while debugging
TF:
Hi,
--- Quote from: sethjackson on April 29, 2006, 02:31:48 pm ---Oh you are building C::B the make way and not with the project file..... Run the "update" script after you compile C::B with make. I believe it should work..... I always use the project file so I'm not 100% sure.....
--- End quote ---
unfortunatelly "update" only works in the trunk. As I installed C::B via checkinstall it needs the scripts in /usr/share/codeblocks/. After copying the scripts folder completely into that location the gdb_types.script error was gone :)
But the problem with debugging still exists - it won't stop at any breakpoint :( The only active button after starting is the STOP button. After clicking it once the STEP buttons getting active, too. As I push F7 I get this message in the "Debugger (debug)" tab:
--- Code: ---Single stepping until exit from function read,
which has no line number information.
--- End code ---
Also no console window appear ...
Regards,
Thomas
P.S.:
--- Quote from: Michael on April 29, 2006, 09:55:53 pm ---The crash in the Settings-->Environment when using the .deb packages was due to not updated resources (zip files) and has been fixed since rev2387.
--- End quote ---
Thanks for info :)
Michael:
--- Quote from: TF on April 29, 2006, 10:52:43 pm ---But the problem with debugging still exists - it won't stop at any breakpoint :(
--- End quote ---
Hello,
May be you could give a try to gdb 6.3 (GNU gdb 6.3-debian on Ubuntu 5.10).
Best wishes,
Michael
TF:
--- Quote from: Michael on April 29, 2006, 11:08:04 pm ---May be you could give a try to gdb 6.3 (GNU gdb 6.3-debian on Ubuntu 5.10).
--- End quote ---
I've created gdb 6.3 from scratch with different location (/usr/local/bin) to 6.4 (/usr/bin/). Also I've changed in Settings -> Compiler and Debugger -> Programs the debugger path to /usr/local/bin/gdb.
Now it shows the gdb 6.3 in the name and version message in the debug tab, but the same behaviour as with 6.4. :(
As I clean the project,build again and start the debugger than it runs to the first breakpoint :o (if it is not a definition line !). Also with F7 it jumps to the next line. But then with the next F7 (to execute "cin.getline(value, 80);") I can't do anything anymore ... There's no possibility in the debugger(debug) tab to enter anything ...
Here's my test code (I've set the breakpoint to "cout << "Please ..."):
--- Code: ---#include <iostream>
#include <cstdlib>
#include <cstring>
using namespace std;
int upstring(char *value);
int main()
{
char value[81]={'\0'};
int upper_count;
cout << "Please type in a String (max. 80 characters): ";
cin.getline(value, 80);
upper_count=upstring(value);
cout << upper_count << " characters are converted" << endl;
cout << "The new string is now: " << value << endl;
return EXIT_SUCCESS;
}
int upstring(char *value)
{
int i=0;
while(*value)
{
if(islower(*value))
{
*value=toupper(*value);
i++;
}
value++;
}
return(i);
}
--- End code ---
Btw. I tried the same with 6.4 and after cleaning the project it works, too. But it ends on the same point as 6.3 (on the getline operation).
Do you know what's going on with the getline operation? Did I do anything wrong?
Regards,
Thomas
P.S.: If I switched back to the default gdb after stop debugging for testing if the cleaning works there too, C::B crashes (hangup) :shock:
Pecan:
Sounds to me like a program is waiting for input somewhere.
Have you tried switching into all the other tasks to see if they
accept input?
This confuses me often also, especially when the debugged window is behind the debugger or the first CodeBlocks window.
As for the debugger stopping on the wrong line. It does that often (for me) also.
gfgfd:
--- Quote from: Pecan on April 30, 2006, 02:59:37 am ---Sounds to me like a program is waiting for input somewhere.
Have you tried switching into all the other tasks to see if they
accept input?
This confuses me often also, especially when the debugged window is behind the debugger or the first CodeBlocks window.
--- End quote ---
codeblocks doesnt seem to show window when debugging console applications.
all output of debugged app is shown on debuggers debug log though..
Version 1.0 revision 2395 (2006-04-28 10:21:25) gcc 3.4.5 Linux/unicode
GNU gdb 6.4
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version