Click to See Complete Forum and Search --> : Threads sharing libraries


nusr
June 19th, 2007, 03:54 PM
How do I know that which thread using which libraries as part of thread execution.
Is there any command to find that ?
usually I use unix 'nm' command to find any string in the library file....Is that helps here...

usman999_1
June 20th, 2007, 05:52 AM
Normally, the libraries you link/use are the same across threads, unless u do something like



if( /*THREAD # 1*/ )
{
//LoadLibrary("SomeLibrary");
}

if( /*THREAD # 2*/ )
{
//LoadLibrary("OtherLibrary");
}




Which to me does not much sense. So normally you use the same libraries for across all the threads in an application.

Regards,
Usman.

Krishnaa
June 20th, 2007, 05:58 AM
There is absolutly no standard (or undocumented) way to do this, the thread running executed what it is coded for, You can however disassemble the thread function, find what all 'call' it makes and then compare them with imported functions etc. that can give you information about threads library usage, if the thread uses functions from any static library then there is no way to know if it was from static lib or implemented inside the module itself.