To be clear, here is my setup and what I would like to do:
-Project A: This project contains a source file test.c. So when compiled it generates an executable test file.
-Project B: This is a library project (DLL) which contains a lib.c file. So when compiled it generates a lib.so file.
The test.c file calls a function using dlopen from lib.so file. Everything is working properly and the test.c file can call the function funcx() from the lib.so file.
What I would like to do is be able to set a break point some where in the funcx() function inside the lib.so file using Eclipse. Is there a way to do this? I've been "debugging" the lib.so file by using printf(), but I really need to use Eclipse's debugger to look at call stack, etc.
1. just put a breakpoint on a project B
2. you must build you lib with debug info
3. try to debug. if your breakpoint wasn't raised:
Right click on project B - Debug as - Debug configurations - Go to tab 'Source' - Add source lookup path. I am not shure exactly for what project you shuold do that. As you run in debug project A it is possible that last steps you should try for project A.