debugging a shared library (unix)

How can I debug a C++ program (unix) that uses a dinamycaly linked library (dlopen(), dlsym())? I mean I want to be able to go through the library code too. I used ddd, but it's not working.

thanks in advance!

nadia

Are u able to set breakpoints in the shared library code? Is the shared library built with "-g" option?

John Arackal

You probably might have to build a debug version of the library. And if you plan to use it with ddd, then make sure you include the flags -ggdb -g minimally.