<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to fix the error &amp;quot;No source file named .....\main.c&amp;quot; when adding a breakpoint in Eclipse when debugging with gdb</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3307/how-to-fix-the-error-no-source-file-named-main-c-when-adding-a-breakpoint-in-eclipse-when-debugging-with-gdb</link><description>When trying to setup the gcc toolchain with Eclipse Luna IDE, I ran into the problem when I can&amp;#39;t set a break point when debugging with the GNU ARM J-Link Debugging Support plugin. When I added a breakpoint, I got &amp;quot;No source file named ... &amp;quot; in the gdb</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 May 2016 09:51:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3307/how-to-fix-the-error-no-source-file-named-main-c-when-adding-a-breakpoint-in-eclipse-when-debugging-with-gdb" /><item><title>RE: How to fix the error "No source file named .....\main.c" when adding a breakpoint in Eclipse when debugging with gdb</title><link>https://devzone.nordicsemi.com/thread/12058?ContentTypeID=1</link><pubDate>Tue, 31 May 2016 09:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29230d23-73dc-427a-926f-955df44ee89f</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;I had the same error, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fix the error "No source file named .....\main.c" when adding a breakpoint in Eclipse when debugging with gdb</title><link>https://devzone.nordicsemi.com/thread/12057?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2014 13:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b76f01c-0b92-44ea-a1c0-caa50da5ce25</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Good information, you should mark it as answered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to fix the error "No source file named .....\main.c" when adding a breakpoint in Eclipse when debugging with gdb</title><link>https://devzone.nordicsemi.com/thread/12056?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2014 12:46:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4005adc3-dd65-438e-bf91-051f2f7ce307</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;After a while, I seemed to find the cause and solution for this. It was because Eclipse seems to used a wrong path to main.c file as shown in the picture, seems like there is an extra backslash \ (gdb trace) and GDB doesn&amp;#39;t like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Debugbug4.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;I tried to fix this by adding a relative path that points to the absolute path instead. In Debug Configuration -&amp;gt; Source, I added Project - Path Relative to Source Folder that point to the project.
And made sure it&amp;#39;s above the Default path.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Debugbug3.PNG" alt="image description" /&gt;(/attachment/d3489266b8d188874d910f9a9aec0268)&lt;/p&gt;
&lt;p&gt;After that Eclipse will set breakpoint using relative path and I was able to debug and set breakpoint, resume, etc.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Debugbug5.PNG" alt="gdb traces" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>