News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Adding GDB to MinGW

Started by Sechem, March 27, 2010, 08:03:42 PM

Previous topic - Next topic

Sechem

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

MortenMacFly

Quote from: Sechem on March 27, 2010, 08:03:42 PM
how can I add it to MinGW? Simply drag it to the folder?
If you mean the MinGW folder: Yes.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Sechem

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?

stahta01

#3
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Another thing, try to run gdb from the console (cmd.exe/command prompt on windows)
(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!]

Sechem

#5
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..?

oBFusCATed

Quote from: oBFusCATed on March 28, 2010, 08:08:41 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
(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!]

Sechem

Quote from: oBFusCATed on March 30, 2010, 08:33:05 PM
Quote from: oBFusCATed on March 28, 2010, 08:08:41 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.

Jenna

Try to download libexpat 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.

Sechem

Ok i did it and now everything works fine.

Thanks for the help again!  :)