Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT does not instruct GDB to load shared library sources(No source file named <NAME> when setting breakpoint)
CDT does not instruct GDB to load shared library sources [message #1422797] Sat, 13 September 2014 11:42
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member
Hi all,

I'm a new CDT user and have just gotten CDT to work the way I want in an auto-tools project with an out-of-source build as explained in this forum thread.

My problem now is that when debugging with gdb, CDT only loads then main source into gdb; it doesn't load sources from the shared library code. Specifically, project structure is:

./
./libtest/libtest.c
./exampleProgram/exampleProgram.c


I can set breakpoints in functions defined in exampleProgram.c and step into code there, but when I try to set breakpoints to functions in libtest.c, the GDB console logs an error:

No source file named /path/to/workspace/test/libtest/libtest.c


Now the path is actually correct. The difference is that this is part of the shared library. Any idea why the symbols for it are not loaded?

Update

I should mention that when I use static linking (reconfigured project with --disable-shared option) then it works fine. So I am using this as a workaround, but now my question is: can CDT Autotools run against the shared library build? I would've expected it to be able to use libtool script for this purpose. Or is that not an option (i.e. for debugging one MUST use statically linked binaries)?

Update 2

Looks like an open bug is already filed for using libtool. As a workaround, the bug mentions setting LD_LIBRARY_PATH. I was actually using this, before I switched to a static binary (specifically I was setting DYLD_LIBRARY_PATH since I am using OS X Mavericks) but still the shared library sources where not available...

[Updated on: Sat, 13 September 2014 14:10]

Report message to a moderator

Previous Topic:Eclipse+SDCC - java.lang.NullPointerException error when creating new project
Next Topic:How do I use an alternate toolchain?
Goto Forum:
  


Current Time: Sat Oct 05 09:50:44 GMT 2024

Powered by FUDForum. Page generated in 0.03386 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top