Solving “No source file named …” in Eclipse and GDB

Sometimes it happens that arm-none-eabi-gdb complains about “no source file named” in the GDB console view in Eclipse when I debug a project with GDB:

No Source File Named in GDB Console

No Source File Named in GDB Console

I certainly can ignore these messages, because they do not affect the functionality. But they are kind of annoying, right? Even more as they source files listed do not have anything to do with the project under debug.

Fixing these messages is easy: in most cases, they are trigged by some break points I still have set for some other projects:

Breakpoint view

Breakpoint view

I can use the ‘show full path’ option to actually see for which files they are configured:

Show Full Paths

Show Full Paths

So here they are set:

breakpoints with full paths

breakpoints with full paths

The projects for these breakpoints are closed in my workspace, so GDB has a problem with these files.

So if I want to get rid of GDB complaining about “No source file named ….” I simply can delete/remove these breakpoints. Done! 🙂

Happy Breakpointing 🙂

5 thoughts on “Solving “No source file named …” in Eclipse and GDB

  1. Hi,
    I noticed that sometimes even if the part of the source code is no more included in the project executable (due to optimisation or temporary #ifdef) it triggers the same error.
    BTW, your solution still works also in that scenario 😀

    Liked by 1 person

What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.