Wikipedia / Ltrace
Wikipedia / Ltrace
ltrace is a debugging utility in Linux, used to display the calls a userspace application makes to shared libraries.
Overview
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 . 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.
See also
strace – system call tracer for linux
ktrace – system call tracer for *BSD
DTrace – Solaris / OS X / BSD / Windows kernel tracing tool
SystemTap – Linux kernel tracing tool
References
External links
Rodrigo Rubira Branco, , Ottawa Linux Symposium 2007
latrace, a dynamic library call tracer which operates using the LD_AUDIT libc feature