In a command prompt I browsed to C:\MinGW\bin and ran:

mingw-get.exe install gdb

That fixed it for me. Not sure if it matters but I have C:\MinGW\bin in my path (guess I probably didn't need to browse to C:\MinGW\bin).

Answer from John on Stack Overflow
🌐
Cplusplus
cplusplus.com › forum › windows › 282740
How can I install gdb using mingw-get? - C++ Forum
Even the web-site http://mingw.org/ is down now. You really want to use the follow-up project Mingw-w64 these days! There are various ways to install Mingw-w64, but I highly recommend to go with MSYS2: https://www.msys2.org/ Once you have MSYS2, just type "pacman -S gdb" in order to install GDB.
🌐
Arch Linux
aur.archlinux.org › packages › mingw-w64-gdb
AUR (en) - mingw-w64-gdb
GDB does some things that don't really translate into a normal VT220-style terminal. Also, because of dependencies, you should have /usr/i686-w64-mingw32/bin in the PATH, try to make sure to do something like "WINEPATH=/usr/i686-w64-mingw32/bin wineconsole gdb ..."
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360009731140-MinGW-w64-GDB-not-working
MinGW-w64 GDB not working – IDEs Support (IntelliJ Platform) | JetBrains
I've done the following: installed MSYS2 using msys2-x86_64-20200903.exe, ran MSYS2, executed pacman -Syu, closed and reopened MSYS2, executed pacman -S mingw-w64-x86_64-toolchain (selected the default "all" option) and as a result compilers and gdb were installed in C:\msys64\mingw64\bin.
🌐
MSYS2
packages.msys2.org › packages › mingw-w64-x86_64-gdb
Package: mingw-w64-x86_64-gdb - MSYS2 Packages
mingw-w64-gdb · Description: GNU Debugger (mingw-w64) Group(s): mingw-w64-x86_64-toolchain · Repo: mingw64 · Homepage: https://www.gnu.org/software/gdb/ License(s): GPL-3.0-or-later · Version: 16.3-1 · External: Anitya · gdb · Arch Linux · 16.3 · AUR ·
🌐
SourceForge
sourceforge.net › home › open source software › software development › compilers › mingw-w64 - for 32 and 64 bit windows › files
MinGW-w64 - for 32 and 64 bit Windows - Browse /External binary ...
Download Latest Version mingw-w64-v11.0.0.zip (16.8 MB) Home / External binary packages (Win64 hosted) / gdb · Try checking the most updated listing Source: README.rst, updated 2024-09-09 · nel_h2 · Enterprise-grade ITSM, for every business · Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.
Find elsewhere
🌐
Sparx Systems
sparxsystems.com › forums › smf › index.php
Debug with MinGW GDB
Debug with MinGW GDB · « previous next » · Print · Pages: [1] Print · Pages: [1] « previous next » · Sparx Systems Forum » · Enterprise Architect » · General Board » · Debug with MinGW GDB · X · stay in touch · Products · Products · Enterprise Architect ·
🌐
MSYS2
packages.msys2.org › packages › mingw-w64-x86_64-gdb-multiarch
Package: mingw-w64-x86_64-gdb-multiarch - MSYS2 Packages
mingw-w64-gdb · Description: GNU Debugger (supports all targets) Group(s): mingw-w64-x86_64-toolchain · Repo: mingw64 · Homepage: https://www.gnu.org/software/gdb/ License(s): GPL-3.0-or-later · Version: 16.3-1 · External: Anitya · gdb · Arch Linux · 16.3 · AUR ·
Top answer
1 of 3
4
  1. Make sure you have followed the MinGW installation as in https://www.msys2.org/ or if you were using installer from link to installer to install MYSYS then you have to continue from step 5 to install required compiler tools use following command insted of step 6 command

pacman -S --needed base-devel mingw-w64-x86_64-toolchain

  1. You should add the same Installation Folder used in step 3 of installation instruction to the system PATH variable or if you have used installer to install the MinGW find the MinGW installation directory by opening your C drive and add that path to system PATH (in my case Ex: C:\msys64\mingw64\bin)

  2. Make sure the C:\msys64\mingw64\bin is not empty, if it's empty mostly you haven't continued from the step 5 after installing MYSYS from installer

  3. After adding system PATH, close and open cmd window just type path in cmd and enter to make sure your MinGW path is addedd to system PATH, (you can copy paste the output to notepad/notepad++ and search MinGW to find the path)

  4. Once MinGW is in the path your gdb command should work (please provide this screenshot of path command output, if it's still didn't work)

2 of 3
1

If you install according to https://code.visualstudio.com/docs/cpp/config-mingw, MSYS2.exe direct install.

  1. check if your path: \msys64\mingw64\bin is empty? if it is empty, it shows the gdb is missing. Follow my step 2

  2. open this website, https://packages.msys2.org/packages/mingw-w64-x86_64-gdb, copy the installation comman: pacman -S mingw-w64-x86_64-gdb

  3. open the MSYS2 installed in your computer, past: pacman -S mingw-w64-x86_64-gdb, the comman you copied in step 2.

    if you see the path: \msys64\mingw64\bin is filled with files. You're successeful. Open a cmd window, and input: gbd --version.

🌐
MSYS2
packages.msys2.org › packages › mingw-w64-ucrt-x86_64-gdb
Package: mingw-w64-ucrt-x86_64-gdb - MSYS2 Packages
mingw-w64-gdb · Description: GNU Debugger (mingw-w64) Group(s): mingw-w64-ucrt-x86_64-toolchain · Repo: ucrt64 · Homepage: https://www.gnu.org/software/gdb/ License(s): GPL-3.0-or-later · Version: 16.3-1 · External: Anitya · gdb · Arch Linux · 16.3 · AUR ·
🌐
Debian
packages.debian.org › sid › gdb-mingw-w64
Debian -- Details of package gdb-mingw-w64 in sid
MinGW-w64 provides a development and runtime environment for 32- and 64-bit Windows applications using the GNU Compiler Collection (gcc). This package contains the gdb debugger which can be used with a Windows-hosted gdbserver to debug programs running on Windows hosts.
🌐
Visual Studio Code
code.visualstudio.com › docs › cpp › config-mingw
Using GCC with MinGW
November 3, 2021 - In this tutorial, you configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger from mingw-w64 to create programs that run on Windows.
🌐
OGG
rpg.hamsterrepublic.com › ohrrpgce › GDB_on_Windows
GDB on Windows
If you are using Linux, you probably already have gdb, but if you are using Windows, you will need to install it. MinGW distributes a Windows version of gdb. You can get the latest mingw installer here which can in turn install gdb. After installing MinGW, run the "MinGW Installation Manager" ...
🌐
Code::Blocks
forums.codeblocks.org › index.php
Adding GDB to MinGW
Adding GDB to MinGW · « previous next » · Send this topic · Print · Pages: [1] Go Down · Send this topic · Print · Pages: [1] Go Up · « previous next » · Code::Blocks Forums » · User forums » · Help » · Adding GDB to MinGW · XHTML · RSS ·
🌐
GitHub
github.com › msys2 › MINGW-packages › blob › master › mingw-w64-gdb › PKGBUILD
MINGW-packages/mingw-w64-gdb/PKGBUILD at master · msys2/MINGW-packages
Package scripts for MinGW-w64 targets to build under MSYS2. - MINGW-packages/mingw-w64-gdb/PKGBUILD at master · msys2/MINGW-packages
Author   msys2
🌐
GitHub
github.com › Microsoft › vscode-cpptools › issues › 684
windows MinGW gdb and there is an error when call gdb · Issue #684 · microsoft/vscode-cpptools
March 27, 2017 - I think program mistake to give gdb command "the set solib-search-path to windows gdb"
Published   May 03, 2017
🌐
MSYS2
packages.msys2.org › packages › mingw-w64-i686-gdb
Package: mingw-w64-i686-gdb - MSYS2 Packages
mingw-w64-gdb · Description: GNU Debugger (mingw-w64) Group(s): mingw-w64-i686-toolchain · Repo: mingw32 · Homepage: https://www.gnu.org/software/gdb/ License(s): GPL-3.0-or-later · Version: 16.3-1 · External: Anitya · gdb · Arch Linux · 16.3 · AUR ·