How to build GDB on Windows
- install (https://sourceforge.net/downloads/mingw) and configure MinGW with packages g++ gcc libc6-dev libtool pkg-config
- get gdb sources (I use 7.latest from https://www.gnu.org/software/gdb/) and put it into MinGW/msys/1.0 folder
- run ./configure in msys shell (MinGW\msys\1.0\msys.bat)
- run make and fix the following:
- hypot compile error with help of this '::hypot' has not been declared
- 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 windowshttps://github.com/Alexpux/MINGW-packages/issues/1909https://sourceforge.net/p/mingw-w64/bugs/576/