How can I debug a shared library in the this case:
A daemon is checking which job is set to run, if find one, the daemon will fork a process. This process will do dlopen/dlsym etc to use the shared library.
The shared library is under my control so I can put one with debug information. While the daemon is not under my control and cannot be stopped for some reason. There is no debug info available in daemon.
Here is how I debug: start gdb, attach to the daemon, set follow-fork-mode to "child", set a breakpoint with the entry point of shared library.
But it doesn't work. The debug session didn't break at the breakpoint i set at all. I use gdb 6.1.1. Thanks.