Use STrace to track all activity between a user process and the kernel. No application change necessary. Good if you want to know about the major external functions that your program calls.
The utility probably needs to find all kernel traps and route those to itself
Same as STrace just for dynamic link libraries (shared libraries)
All dynamic mechanisms have the problem that one has to know exactly WHICH library will be loaded, WHICH class loaded. This utility does it and there is one also for the Windows world but I forgot it, sorry. BTW: the unix shell also has a dynamic load mechanism and that is what the WHICH utility is for: it tells you which utility is loaded from which path. There might be duplicates in different places and the PATH variable will decide which one gets loaded.