I have 64 bit operating system, 64 bit codeblocks, 32 bit MINGW. If that matters. I tried both 32 bit GDB and 64 bit. Same result.
I think if you want to build 32bit applications under windows, you need a 32bit C::B, 32bit gcc compiler suite, and 32bit gdb.
If you want to build 64bit applications, then all the tools should be 64bit.
The internal reason is that if you want to halt the debugee when debugging, you need to call an Win32 API function from C::B, and the debugger have to catch the exception. All the process should be in same 64bit application processes or 32 bit processes.