ltrace.1 (2010 09)

l
ltrace(1)
Integrity Systems Only
ltrace(1)
If any internationalization variable contains an invalid setting,
ltrace behaves as if all internationali-
zation variables are set to
C. See environ (5) for more information about environment variables.
RETURN VALUE
ltrace returns zero on success. A non-zero value is returned in case of failure.
EXAMPLES
In the following example,
ltrace creates a file named
logfile.txt in the current working directory,
traces procedure calls to all libraries used by the application, and logs the messages in
logfile.txt.
$ ltrace ./a.out
The logfile.txt file contains the following trace messages:
lwp # 0x5318a8:/usr/lib/hpux32/libc.so.1:printf(0x40007
c0(char*){hello})
lwp # 0x5318a8:/usr/lib/hpux32/libc.so.1:malloc(0x2010)
lwp # 0x5318a8:/usr/lib/hpux32/libc.so.1:__errno()
lwp # 0x5318a8:/usr/lib/hpux32/libc.so.1:__errno()
lwp # 0x5318a8:/usr/lib/hpux32/libc.so.1:__errno()
lwp # 0x5318a8:/usr/lib/hpux32/libc.so.1:__errno()
The following invocation creates a logfile named mylogfile to log the trace messages:
$ ltrace -f mylogfile ./a.out
The following invocation shows how to pass the -ltr argument to the ls command being traced:
$ ltrace /usr/bin/ls -a -ltr
The following invocation shows how to pass multiple arguments:
$ ltrace /usr/bin/cc -a "-c hello.c -o hello.o"
AUTHOR
ltrace was developed by the Hewlett-Packard Company.
FILES
/usr/lib/hpux32/dld.so
32-bit Integrity system dynamic loader
/usr/lib/hpux64/dld.so
64-bit Integrity system dynamic loader
/usr/lib/nls/$LANG/ltrace.cat
ltrace message catalog
ALSO SEE
System Tools
ldd(1) Lists dynamic dependencies of executable files and shared libraries.
Miscellaneous
a.out (4) assembler, compiler, and linker output.
dld.so (5) dynamic loader.
Texts and Tutorials
HP-UX Linker and Libraries User’s Guide
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010