User forums > General (but related to Code::Blocks)
GDB problem in code::blocks 20.03 on WIN 10-64b
igartner:
Hi, thanks for the support and care: I appreciate!!
I tried the same things with CB 1712: break point works, the program flow stops, but other serious pb come up very soon (e.g. stepping through the code, displaying values of data as pg advances). Simple debug operations seem very problematic: program hangs or goes away without any msg.
Debugger (gdb) seems to me unusable even in this older version, so I am back to "debug by printf".
Any other suggestion? Thanks for your cooperation....
gd_on:
Have a look to the user manual : http://www.codeblocks.org/user-manual
There is a chapter containing different addresses for different compiler's versions. May be you'll find something which works for you...
Myself, I use frequently gdb which works as expected, but I'm in 64 bits now. But, sometimes ago, it worked well in 32 bits too.
I know also that some gdb versions don't like spaces in path. This is not the case for your code, but gdb itself is in your "program files" ! May be try to move your MinGW in a folder without spaces in the path. That's worth a try !
gd-on
igartner:
Thanks for your concern and suggestions. Indeed spaces in file names is not liked by Unix/Linux originated pg like GDB. I tried to install CB such that GDB will have a "clean of space" path. Here is what I got:
==
[debug]Command-line: D:\PFX86\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet D:\MyDocs\Work\C-simplex\bin\Debug\C-simplex.exe -args D:/MyDocs/Work/C-simplex/bin/Debug/C-simplex.exe
[debug]Working dir : D:\MyDocs\Work\C-simplex
Starting debugger: D:\PFX86\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet D:\MyDocs\Work\C-simplex\bin\Debug\C-simplex.exe -args D:/MyDocs/Work/C-simplex/bin/Debug/C-simplex.exe
failed
==
The compilation log was:
-------------- Build: Debug in C-simplex (compiler: GNU GCC Compiler)---------------
mingw32-gcc.exe -Wall -g -g -c D:\MyDocs\Work\C-simplex\main.c -o obj\Debug\main.o
mingw32-g++.exe -o bin\Debug\C-simplex.exe obj\Debug\main.o
Output file is bin\Debug\C-simplex.exe with size 28.65 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
==
Apart of the double flag -g things seem absolutely ok; I love debugging close to the assembly code, but few people seem to care since even for this CB 17.12 of 2019 GDB quality is unacceptably poor (break points do not work, stepping through code neither etc...).
Since CB have been working and delivered with such low GDB quality, I guess people are back to "printf debugging" and ignore GDB: too bad, back to the future !
igartner:
In fact the pb looks as beeing 32-64 bit architecture related.
Naive me: I imagined that after 50y of SW development & given several HW CPU architectures, this feature would become either somewhat "transparent" or visibly documented at least in an error msg coming from GDB in the last instance. But no way...
In ver 19.12 (advertised as 64b) after investigation I noticed that GDB delivered was only the 32 bit one (gdb32.exe) and thus if one sets the compiler switch accordingly one might envisage debug +/- properly.
In new 20.03 version, advertised also as 64b, GDB type is unclear (gdb.exe without any specifics) is 32 or 64 bits, because the name does not indicate it at all: so good luck or "back to printf debugging".
oBFusCATed:
Right clicking on the executable should tell you what it is. If you start it in the task manager you'll see it also.
Navigation
[0] Message Index
[*] Previous page
Go to full version