On Windows WinGDB can debug programs compiled in one of two environments: MinGW or Cygwin. In order to use Cygwin, the following configuration steps needs to be performed:
Open the WinGDB/Preferences dialog. On General tab, there is a section related to Cygwin:
You should now be able to debug Cygwin programs the same way as MinGW programs (using "local" as the connection address).
If you want to debug a MinGW program, you must turn the Cygwin option off. These two environments are incompatible.
Cygwin introduces its own mechanism for directory mappings. Local files and directories on Windows are mapped onto virtual Unix-like filesystem. WinGDB automatically respects this mapping in Cygwin mode. You don't need to specify source mappings in WinGDB, as opposed to remote mode. Also, these mappings will not work in Cygwin mode. They are intended for remote mode only.
Some embedded toolchains also use Cygwin. You can use these toolchains with WinGDB, turning on the Cygwin mode as described above. You have to determine yourself whether your toolchain needs it. In case of toolchains not using Cygwin, also do not enable the Cygwin support in WinGDB as it might lead to errors. For example, CodeSourcery toolchains for ARM/GNU Linux do not use Cygwin. On the other hand, standard Android toolchains do.