Code::Blocks Forums

User forums => Help => Topic started by: Sechem on March 27, 2010, 08:03:42 pm

Title: Adding GDB to MinGW
Post by: Sechem on March 27, 2010, 08:03:42 pm
Hi

i installed MinGW on Vista with the installer. But the GDB Debugger isn't included. If I download the GDB package from http://sourceforge.net/projects/mingw/files/ how can I add it to MinGW? Simply drag it to the folder?

Sechem
Title: Re: Adding GDB to MinGW
Post by: MortenMacFly on March 28, 2010, 03:34:27 pm
how can I add it to MinGW? Simply drag it to the folder?
If you mean the MinGW folder: Yes.
Title: Re: Adding GDB to MinGW
Post by: Sechem on March 28, 2010, 06:53:54 pm
Okay, that's the problem. It doesn't work. I dragged the whole extracted GBD-Folder to the MinGW folder. Then I told CodeBlocks under Toolchain Executebles to use this debugger (I selected gdb.exe). But if I try to debug, it only sais that the Toolchain Executable is not set.

Can anyone help?
Title: Re: Adding GDB to MinGW
Post by: stahta01 on March 28, 2010, 07:21:08 pm
Does gdb.exe exist in the bin folder under the MinGW GCC Installation directory?
If not, you did something wrong.

IIRC, the steps to do it right.
1. Install 7-zip
2. Download the GDB Bin file from MinGW
3. Move GDB Bin file to MinGW Installation folder
4. Right click of file and choose extract here
5. Right click on created .tar file and choose extract here
6. Verify the GDB.exe exists in bin folder.

Tim S.
Title: Re: Adding GDB to MinGW
Post by: oBFusCATed on March 28, 2010, 08:08:41 pm
Another thing, try to run gdb from the console (cmd.exe/command prompt on windows)
Title: Re: Adding GDB to MinGW
Post by: Sechem on March 30, 2010, 07:50:21 pm
Thank you for the help. I did the steps that stahta01 told me and at least it seems to be setup correctly. But now there is another problem: when I start the debugger there is the message that libexpat-1.dll couldn't be found and the debugger crashes. What's now wrong..?
Title: Re: Adding GDB to MinGW
Post by: oBFusCATed on March 30, 2010, 08:33:05 pm
Another thing, try to run gdb from the console (cmd.exe/command prompt on windows)

Or double click the gdb.exe in explorer to see if it has all needed dlls
Title: Re: Adding GDB to MinGW
Post by: Sechem on March 30, 2010, 11:02:01 pm
Another thing, try to run gdb from the console (cmd.exe/command prompt on windows)

Or double click the gdb.exe in explorer to see if it has all needed dlls

I double clicked it and again it says that the libexpat-1.dll couldn't be found.
Title: Re: Adding GDB to MinGW
Post by: Jenna on March 30, 2010, 11:14:01 pm
Try to download libexpat (http://sourceforge.net/projects/mingw/files/MinGW%20expat/expat-2.0.1-1/libexpat-2.0.1-1-mingw32-dll-1.tar.gz/download) and put the dll into the same directory, you have put the gdb.exe (most likely MinGW\bin ) and try it again.
I hope this is the correct version for your gdb.
Title: Re: Adding GDB to MinGW
Post by: Sechem on March 31, 2010, 12:30:36 am
Ok i did it and now everything works fine.

Thanks for the help again!  :)