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 :
#include <iostream>
int main()
{
int a = 0;
{for(int i = 0; i < 10; ++i)
{
a += i;
}}
std::cout << "Hello world!" << std::endl;
return 0;
}
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.
I'm having the same issues as VincentB. I was using the g++ and gdb from my dev-cpp directory so I thought these could cause problems. After downloading and installing MinGW 5.1.3 and GDB 6.3, I changed the compiler and debugger path in C::B.
Compiling goes well, but debugging gives some weird errors:
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.3
Child process PID: 2932 <--- Never got this message with the old debugger
At *removed_filename*.cpp:49 <--- Normal message, but debugger hangs from here, as it always did
Trying to pause the running process... <--- Can't abord, have to shut down C::B
Trying to pause the running process...
So this is even worse then the old behaviour: I can't stop de debugger anymore :o. Replacing gdb.exe (6.3) with gdb.exe (5.2.1) gives me the random hanging behaviour I'm used to, so I'll use that for the moment.
Edit: Changing the default compiler doesn't work either. Plus: the auto detect function forgets to update the search directories, resulting in some weird errors if you don't change it manually. Is there a way I can report all my bugs in an easy way without having to register at a website again?