解决eclipse调试c++程序出现“No source file named” error

4 篇文章 0 订阅
2 篇文章 0 订阅

http://blog.initm.com/eclipse-error-debug/

前些天遇到的问题这是,早就应该写了,但是需要做的事情太多,一直拖到要走了,拖不动了,写!和上一篇文章是相关的,因为我换了一个编辑器eclipse,第一次用,所以遇到一些问题,提示出现No source file named  怎么解决呢?

试了几次没有效果之后开始百度。中文的没有找到相关的文章,于是开始找英文的,英文很水,但是能看懂大概意思。下面我来说一下解决方法:

1.首先我们打开Debug Configurations

Debug Configurations

2.在弹出的窗口中选择Select other

选择Select other

3.然后在弹出的对话框中勾选Use configuration specific settings  然后选择Standard Create Process Launcher  确定

Use configuration specific settings  然后选择Standard Create Process Launcher  确定

4.然后打开Debugger选项卡,如下设置一下

Debugger

5.然后勾选这个Use full file path to set breakpoints

Use full file path to set breakpoints

OK  搞定

参考资料:

http://stackoverflow.com/questions/12965726/no-source-file-named-error-debugging-eclipse-cdt





http://wp.brodzinski.net/eclipse/source-file-named-main-c-gdb-error/

„NO SOURCE FILE NAMED” – GDB ERROR IN ECLIPSE LUNA


Recently I came across a quite difficult problem during setting up a debug configuration for my STM32 ARM development environment in Eclipse.
When I was running a I always got „file not found” error in GDB console.

GDB error:
1
2
Function "0x8000000" not defined.
No source file named C:\\ARM\\workspace\\blinky\\src\\main.c.

No source file named ... GDB error

Solution:

Go to your Debug Configuration -> Configure Workspace Settings
Debug Configurations window.

Expand Run/Debug -> Launching -> Default Launchers 
Select GDB Hardware debugging -> Debug (or Release depending on your Configurations)
Select option Legacy GDB Hardware Debugging Launcher
Then click Apply and OK
Changing launcher.

Then click Apply and OK

Now debug should work without any problems.

Related links:

http://stackoverflow.com/questions/19864204/eclipse-mingw-cdt-gdb-and-problems-with-debugging


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值