Reputation: 11
I'm trying to debug into a third-party library (GTS). I installed the shared library and its debugging symbols from the Synaptic Package Manager in Ubuntu. I also downloaded the source files for the library from Sourceforge.
I'm using Eclipse CDT to debug one the provided examples, and I would like to go into the library's code. The problem is that during debugging, Eclipse simply skips the library function calls even when i go into it step by step.
Can someone help me with this problem.. Thanks
I'm using Eclipse Helios with CDT 7.0
Upvotes: 1
Views: 4989
Reputation: 123
To debug into an external library it has to be compiled with debug information. This link provides good information on this topic. The way to do this is to cmake the library with '-DCMAKE_BUILD_TYPE=Debug' option, and then install it. Use the debug libraries to build your code. If the debugging doesn't work after this(I had problems with loading the dynamic library symbols) , do a 'sudo ldconfig -v'.
Upvotes: 0
Reputation: 213799
Obviously either GDB is not finding the debugging symbol files, or is rejecting them as not matching your actual binaries.
As the first step, try to figure out where GDB is looking, and whether the files are there. The following (gdb) show debug-file-dir
should tell you where GDB is looking for separate debuginfo files.
If the .debug/
files are actually installed where GDB expects them, (gdb) set verbose on
may provide additional clues about why they do not get loaded.
Upvotes: 1