Using gdb on Windows
If you want to use the GNU Debugger on Windows, say for Code::Blocks or Eclipse CDT, you have two options: Cygwin and MinGW. Cygwin is pretty easy to install, but uses Unix paths internally. This makes it a pain to set up. MinGW uses Windows paths, but there is no fancy setup.exe. Okay, there is an installer, but I did not find a way to install gdb. You can install MinGW components package by package, but I ended up with gdb crashing due to “Missing libexpat-1.dll”.
Fortunately, there is another installer for MinGW, and this one brings everything you need, even gdb: TDM’s GCC/MinGW32 Builds. And this one is working fine for me.
If somebody would be interested in debugging with GDB under Visual Studio (support for Linux, MinGW and Cygwin), then check our site
Kind regards,
WinGDB.com team