User forums > Using Code::Blocks
Debugging session gets frozen
VincentB:
Dear Code::Blocks experts,
I am a new comer to Code::Blocks, I am working with svn build 3677, on top of MinGW/MSYS, WindowXP.
The debugger is GNU gdb 5.2.1
What happens to me is with the following code :
--- Code: ---#include <iostream>
int main()
{
int a = 0;
{for(int i = 0; i < 10; ++i)
{
a += i;
}}
std::cout << "Hello world!" << std::endl;
return 0;
}
--- End code ---
I set a breakpoint on the line {for(int i = 0; i < 10; ++i), then I start the program by pressing F8, then I press F7 once to get on line a += i;, then I open the watch window and click right into it, select "Add Watch" and add "i" variable as a watch, and select "decimal" for output format.
Then I press F7 something like 20 times, until I get on the line std::cout << "Hello world!" << std::endl;, just when I get there the "i" symbol in the watches window becomes red, and the F7 key is no longer operative, and all the debugging is like frozzen (all are greyed in the Debug menu). The only thing that I can do then is go to Menu:Debug-> Stop Debugger
This happened to me in a more complicate program, but I could reproduce it with this very simple one, so I think that this may be a bug of Code::Block or of gdb.
Could any one help me, :?
Very best regards,
Vincent.
Pecan:
On XP, I'm not able to reproduce the problem. Seems to work for me.
GDB 6.3
byo:
I can confirm some weird behaviour of debugger in few latest nightlies. Sometimes when debugger stuff should be active it's not, it occured when I was debugging program with few breakpoints. First break worked OK, when second should be reached, it looked like GDB catches it but debuger plugin doesn't see this which resulted in disabled debugger stuff.
I'm almost sure it's related to lastest Break-When-Running feature. I had few situations when debugger plugin tried to break into program which has already been stopped.
Currently I'm working on Centrino 700 Mhz laptop, sometimes it looks like there's big latency between gdb and debugger plugin so maybe here's the problem.
Regards
BYO
VincentB:
Dear Mr Pecan,
Thank you for your kind answer.
Could you make me know where you got GDB 6.3, I went on the MinGW site http://www.mingw.org/download.shtml and the latest GDB version available is 5.2.1-1, which is the one I downloaded on my machine.
Are you based on MinGW or on Cygwin ?
Which version of Code::blocks are you using ?
Regards,
Vincent.
PS : for providing similar information as Mr Byo, I am working with an Intel(R) Pentium(R) 4CPU 2.80GHz desktop PC
Biplab:
Download GDB 6.3 from the following link.
--- Quote ---http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download
--- End quote ---
Regards,
Biplab
Navigation
[0] Message Index
[#] Next page
Go to full version