thread_db usage
Hi,
I am trying to use the thread_db library to detect when another process has created a new thread. This is for a project where I have legacy code running in another process that I cannot change. Anyway, I am using dlopen and dlsym to get function pointers to functions in that library and calling them. I seem to be able to call the td_init function okay, but when I call td_ta_new I get an error.
symbol_lookup_error: /lib/tls/libthread_db.so.1: undefined symbol: ps_pglobal_lookup
Now I understand that I have to define that function for the library to use, along with a number of other functions. I have defined ps_pglobal_lookup non-statically in the source code (and even call it once just to make sure it doesn't get optimized out somehow) but this error still occurs. Does anyone have any ideas why thread_db cannot find that function? Is there some compiler/linker option I need to specify to get this to work, or could it be something else?
Any help would be much appreciated.
|