Author Topic: Adding GDB to MinGW  (Read 14539 times)

Offline Sechem

  • Single posting newcomer
  • *
  • Posts: 9
Adding GDB to MinGW
« 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Adding GDB to MinGW
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Sechem

  • Single posting newcomer
  • *
  • Posts: 9
Re: Adding GDB to MinGW
« Reply #2 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Adding GDB to MinGW
« Reply #3 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.
« Last Edit: March 28, 2010, 07:23:55 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Adding GDB to MinGW
« Reply #4 on: March 28, 2010, 08:08:41 pm »
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!]

Offline Sechem

  • Single posting newcomer
  • *
  • Posts: 9
Re: Adding GDB to MinGW
« Reply #5 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..?
« Last Edit: March 30, 2010, 07:52:39 pm by Sechem »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Adding GDB to MinGW
« Reply #6 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
(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!]

Offline Sechem

  • Single posting newcomer
  • *
  • Posts: 9
Re: Adding GDB to MinGW
« Reply #7 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Adding GDB to MinGW
« Reply #8 on: March 30, 2010, 11:14:01 pm »
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.

Offline Sechem

  • Single posting newcomer
  • *
  • Posts: 9
Re: Adding GDB to MinGW
« Reply #9 on: March 31, 2010, 12:30:36 am »
Ok i did it and now everything works fine.

Thanks for the help again!  :)