“No source file named” error debugging Eclipse CDT

后端 未结 7 1742
醉梦人生
醉梦人生 2020-12-31 03:25

I\'ve got a project with a shared library (loaded dynamically), and I\'m attempting to debug it. I get the following error message:

No source file named /ho         


        
7条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 03:52

    I just came across the same issue, although my breakpoints were in the executable itself, not in a shared library. To solve this, I had to open the "Debug configuration", select my debug configuration and adjust the following settings:

    • At the bottom, there is a link "Select other ..." to select the Create Process launcher. Click the link. Tick the "Use configuration specific settings". Select "Standard Create Process Launcher" and press "Ok".
    • Go to the "Debugger" tab, and on the top of the tab select "Debugger: gdb/mi". What may/may not make a difference: On the same tab there is also a checkbox "Use full file path to set breakpoints" - I played with this, but it does not seem to affect the issue we observe (obviously, our source paths are already full paths).

    For breakpoints in shared libraries, you might need additional information (especially about deferred breakpoints) from Debugging with eclipse cdt and gdb and Why does eclipse cdt ignore breakpoints.

    Note: This refers to Eclipse Kepler (4.3) and gdb 7.4.

提交回复
热议问题