News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Trouble with TDM64-GCC and debugging

Started by ncassetta, March 25, 2016, 02:09:04 PM

Previous topic - Next topic

ncassetta

I installed separately first TDM64-GCC 5.1.0-2 (in its standard folder C:\TDM-GCC-64) and then CodeBlocks 16.1 in Windows 10. CodeBlocks detected correctly the compiler, but not gdb.
I tried to compile your "hello" project and all went OK. When I tried to debug, CodeBlocks said: "ERROR: you must specify a debugger program in the debugger's settings". In the settings the 'Executable path' field was empty and red coloured.
If I write "gdb.exe" in the field the debugger starts, but hangs on the first cout << "Hello world" line and I must use Ctrl Alt Canc to kill it.
I saw another GDB64/bin subfolder of TDM and tried with it but the result is the same. However, the "Executable path" box remains red whatever I write.
Is this a TDM problem? Is there a particular version of it I must install with CodeBlocks (I'd prefer to have a compiler folder separate from CodeBlocks one, as in your MingW download).

oBFusCATed

Quote from: ncassetta on March 25, 2016, 02:09:04 PM
If I write "gdb.exe" in the field the debugger starts, but hangs on the first cout << "Hello world" line and I must use Ctrl Alt Canc to kill it.
What do you mean by hangs?
Does everything work correctly if you use command line gdb?

Quote from: ncassetta on March 25, 2016, 02:09:04 PM
However, the "Executable path" box remains red whatever I write.
Have you tried with a full path to the debugger?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ncassetta

 Hangs means gdb entered the "cout << "Hello world!" line with the "Step into" button but never returned. Clicking the "Stop debugging" icon didn't stop it, and I found the gdp process in the Ctrl Alt Canc window. However also gdb from the command line had the same problem with the "step" command, giving me a lot of warnings, so I guessed it was a compiler problem.
I resolved removing TDM-64 and installing the 32 bit version, which is OK.
However thanks for your suggestion (with CodeBlocks I had almost forgotten command line  :)).