Compiling GDB under Windows

Just a quick post to make things simpler for everyone who is googling for help when compiling GDB debugger under Windows.

There are two small oddities that require edits in the source code when compiling GDB 6.8 using MingW with MSYS.

  • In sim\common\sim-signal.c: replace #ifdef _MSC_VER with #ifdef _WIN32
  • In gdb\tui\tui-io.c: find the line with /* #undef TUI_USE_PIPE_FOR_READLINE */ and uncomment it

After you change this, just “configure” and “make” and you are good to go.

And if you want the TUI (textmode GUI interface), install PDCurses to your MSYS directory (and create a link from MSYS\lib\libpdcurses.a to MSYS\lib\libcurses.a; not sure it’s neccessary, but that’s what I did) before running the configure script.

Built with Hugo
Theme Stack designed by Jimmy