'Debugging with Eclipse CDT and GDB: can't find source file

When I try to debug my application using GDB from eclipse CDT, I get the following error:

 Can't find a source file at "../mingw/main.c"
 Locate the file or edit the source lookup path to include its location.

Eclipse is looking for the source file location at ../mingw/main.c, but it should be in /edit/src/main.c. As you can see in the screenshot below, edit/src is part of the source lookup path. Why is looking in ../mingw? I can't find any configuration setting that makes it look there.

Here is a screenshot that indicates the problem

I'm using eclipse Juno, CDT 8.1, Windows 7 64bit



Solution 1:[1]

in "Debug Configuration" (under debugger popup icon) in Debugger tab uncheck "stop on startup at", after this it will not stop on startup, but u can put breakpoint there if u like

Solution 2:[2]

Nothing works. No solution as above worked except below

I simply replaced gdb with msys gdb

ie. for example

current configuration

... Application Configuration .. Debug .. Debug

GDB Debugger gdb

to

GDB Debugger path to msys gdb (like for example c:\msys\bin\gdb.exe

Manu

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user2432383
Solution 2 manu