How to build GDB on Windows

我们两清 提交于 2020-06-10 17:00:48

问题


How does one build GDB (the GNU Debugger) from source on Windows? I need to build it in order to make a build with Python support. I cannot use the one distributed with Cygwin because it has problems interpreting backslashes on Windows. What toolchains do I need for the build -- GnuWin32, MinGW, etc.? Can someone please provide step-by-step instructions on how to do this?


回答1:


  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/



来源:https://stackoverflow.com/questions/42566868/how-to-build-gdb-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!