The following example is made with Eclipse Mars, Cygwin, gcc and gdb. However, the same applies to all other compilers and environments, too.
Don’t forget this. Otherwise sources symbols cannot not mapped.
This options can be found under Run->Debug Configurations... or click on the arrow next to the green spider.