1. install (https://sourceforge.net/downloads/mingw) and configure MinGW with packages g++ gcc libc6-dev libtool pkg-config
  2. get gdb sources (I use 7.latest from https://www.gnu.org/software/gdb/) and put it into MinGW/msys/1.0 folder
  3. run ./configure in msys shell (MinGW\msys\1.0\msys.bat)
  4. run make and fix the following:
  5. hypot compile error with help of this '::hypot' has not been declared
  6. undefined constants for GetLastError function by adding #include <winerror.h> into \gdb\gdbserver\win32-i386-low.c \gdb\gdbserver\win32-low.c gdb\ser-mingw.c

I have checked build process using 7.11.1 and 7.12.1 sources

7.12.1 x32 is broken under windows https://github.com/Alexpux/MINGW-packages/issues/1909 https://sourceforge.net/p/mingw-w64/bugs/576/

Answer from se_pavel on Stack Overflow
  1. install (https://sourceforge.net/downloads/mingw) and configure MinGW with packages g++ gcc libc6-dev libtool pkg-config
  2. get gdb sources (I use 7.latest from https://www.gnu.org/software/gdb/) and put it into MinGW/msys/1.0 folder
  3. run ./configure in msys shell (MinGW\msys\1.0\msys.bat)
  4. run make and fix the following:
  5. hypot compile error with help of this '::hypot' has not been declared
  6. undefined constants for GetLastError function by adding #include <winerror.h> into \gdb\gdbserver\win32-i386-low.c \gdb\gdbserver\win32-low.c gdb\ser-mingw.c

I have checked build process using 7.11.1 and 7.12.1 sources

7.12.1 x32 is broken under windows https://github.com/Alexpux/MINGW-packages/issues/1909 https://sourceforge.net/p/mingw-w64/bugs/576/

Answer from se_pavel on Stack Overflow
🌐
OGG
rpg.hamsterrepublic.com › ohrrpgce › GDB_on_Windows
GDB on Windows
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" (which for me was located in C:\MinGW\libexec\mingw-get\guimain.exe ) and then make sure that the mingw32-gdb bin ...
🌐
Windows10download.com
windows10download.com › w10-gdb.html
Gdb Windows 10 downloads - Free Gdb download for Windows 10 - Windows 10 Download
... tool that offers a superior user interface for GDB (GNU Debugger) and LLDB. It is a seamless blend of a traditional debugger with a modern ... Price: FREE / Freeware · code analysis - GNU - GNU debugger - Cygwin - user-friendly interface - debugger GUI - Affinic Debugger GUI - Affinic Technology - Windows 10 application - debugger - software debugging - Cygwin debugger
🌐
GNU Project
sourceware.org › gdb
GDB: The GNU Project Debugger
Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another. Those programs might be executing on the same machine as GDB (native), on another machine (remote), or on a simulator. GDB can run on most popular UNIX and Microsoft Windows variants, as well as on macOS.
🌐
Gdbgui
gdbgui.com › installation
Installation - gdbgui
Minimal GNU for Windows (MinGW) is the recommended Windows option. Install MinGW with the "MinGW Base System" package. This is the default package which contains make, gcc, and gdb.
Find elsewhere
🌐
Medium
medium.com › @pamirghimire › debugging-with-gdb-on-windows-using-visual-studio-code-81ba70b562f3
Debugging with GDB on Windows using Visual Studio Code | by Pamir Ghimire | Medium
June 6, 2020 - So MinGW is the GCC port for Windows that allows you to build native Windows applications [1]. An installer for MinGW is available here. Bundled with this installation comes GDB, a classic debugger for C/C++ [2]. You can find it at path\\to\\MinGW\\bin\\gdb.exe`. So now you have a C/C++ compiler and a debugger.
🌐
GNU
gnu.org › software › gdb › gdb.html
GDB: The GNU Project Debugger
Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another. Those programs might be executing on the same machine as GDB (native), on another machine (remote), or on a simulator. GDB can run on most popular UNIX and Microsoft Windows variants, as well as on Mac OS X.
🌐
Intel
intel.com › content › www › us › en › docs › distribution-for-gdb › get-started-guide-windows › 2023-0 › overview.html
Get Started with Intel® Distribution for GDB* on Windows* OS Host
You can use a SYCL* sample code, Array Transform, to get started with the Intel® Distribution for GDB*. The sample does not generate errors and simply illustrates debugger features. The code processes elements of the input array depending on whether they are even or odd and produces an output array. You can use the sample to debug on a CPU. Install the Intel® oneAPI Base Toolkit for Windows* OS.
🌐
Visual Studio Code
code.visualstudio.com › docs › cpp › cpp-debug
Debug C++ in Visual Studio Code
November 3, 2021 - You can debug Windows applications created using Cygwin or MinGW by using VS Code. To use Cygwin or MinGW debugging features, the debugger path must be set manually in the launch configuration (launch.json). To debug your Cygwin or MinGW application, add the miDebuggerPath property and set its value to the location of the corresponding gdb...
🌐
GitHub
github.com › OpenShot › openshot-qt › wiki › Windows-Debugging-with-GDB
Windows Debugging with GDB
The Windows version of OpenShot is compiled using an environment called MSYS2. In order to attach the GDB debugger to our executable, openshot-qt.exe, you must first install MSYS2.
Author   OpenShot
🌐
GitHub
github.com › ssbssa › gdb
GitHub - ssbssa/gdb: Unofficial Windows build of gdb with added features.
Custom Windows build of gdb with these features: reading and writing of minidump files · TUI windows for locals/display/threads/frames/memory/cmd-history · ported to Windows: info os processes · info proc · record btrace pt ·
Starred by 79 users
Forked by 9 users
Languages   C 45.8% | Makefile 24.3% | Assembly 14.0% | C++ 5.1% | DTrace 4.4% | Roff 1.1%
🌐
GNU Project
sourceware.org › gdb › download › ANNOUNCEMENT
GDB 16.3
GDB is a source-level debugger for Ada, C, C++, Fortran, Go, Rust, and many other languages. GDB can target (i.e., debug programs running on) more than a dozen different processor architectures, and GDB itself can run on most popular GNU/Linux, Unix and Microsoft Windows variants.