Ltrace

ltrace is a debugging utility in Linux, used to display the calls a userspace application makes to shared libraries. It does this by hooking into the dynamic loading system, allowing it to insert shims which display the parameters which the applications uses when making the call, and the return value which the library call reports. ltrace can also trace Linux system calls. Because it uses the dynamic library hooking mechanism, ltrace cannot trace calls to libraries which are statically linked directly to the target binary. Since 0.7.3, ltrace can also trace calls to libraries which are loaded using dlopen.

Example output
The following is the first few lines of an invocation of xterm. It shows ltrace displaying calls to a variety of libraries, including the C standard library (malloc, strlen), POSIX libraries (getuid), X Toolkit Intrinsics (XtOpenApplication), and the X11 inter-client communication library (IceAddConnectionWatch). A call's return value is shown after the = symbol.