Table of Contents

Debugging Cygwin programs

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:

You should now be able to debug Cygwin programs the same way as MinGW programs (using "local" as the connection address).

Cygwin and MinGW

If you want to debug a MinGW program, you must turn the Cygwin option off. These two environments are incompatible.

Cygwin and directory mappings

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.

Cygwin and embedded systems

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.

Table of Contents


Copyright (C) 2008-2019 SOFT-ERG. All rights reserved.