How to get gdb working with Eclipse CDT under windows (fails to find source code)

前端 未结 5 2120
孤城傲影
孤城傲影 2021-02-04 10:03

I installed cygwin (the latest 1.7.xx?), and then installed eclipse cdt (Juno).

When I tried to build a hello world project, despite eclipse identifying that cygwin was

5条回答
  •  Happy的楠姐
    2021-02-04 10:29

    Here is how I made it work.

    1. I goto Window ==> Preferences ==> C/C++ ==> Debug ==> Source Lookup Path
    2. I Add a Path Mapping: Project Source
    3. On the left side I put the path that Cygwin expects, i.e. \home\MyName\projects and on the right side I put the Windows path, i.e. C:\cygwin\home\MyName\projects

    Then when I debug it finds the source file fine.

提交回复
热议问题