blob: f84ab4d7ee2f682f8a2129264cf3e648b88ec6a9 [file] [log] [blame]
Juan Cespedes64e793b1997-09-11 23:22:36 +02001.\" Copyright (c) 1997 Juan Cespedes <cespedes@debian.org>
Juan Cespedes07461b61997-08-22 15:29:10 +02002.\" This file is covered by the GNU GPL
3.TH ltrace 1
4.SH NAME
5ltrace \- A library call tracer
6
7.SH SYNOPSIS
8.B ltrace
Juan Cespedesac3db291998-04-25 14:31:58 +02009.I "[-dfiLStttChV] [-a column] [-s strsize] [-o filename] [-u username] [-p pid] ... [-e expr] [--debug] [--demangle] [--align=column] [--output=filename] [--help] [--version] [command [arg ...]]"
Juan Cespedes07461b61997-08-22 15:29:10 +020010
11.SH DESCRIPTION
12.B ltrace
13is a program that simply runs the specified
14.I command
15until it exits. It intercepts and records the dynamic library calls
16which are called by the executed process and the signals which are
17received by that process.
Juan Cespedesac3db291998-04-25 14:31:58 +020018It can also intercept and print the system calls executed by the program.
Juan Cespedes07461b61997-08-22 15:29:10 +020019.PP
20Its use is very similar to
Juan Cespedes81690ef1998-03-13 19:31:29 +010021.BR strace(1) .
Juan Cespedes07461b61997-08-22 15:29:10 +020022
23.SH OPTIONS
24.TP
Juan Cespedesac3db291998-04-25 14:31:58 +020025.I \-d, \-\-debug
Juan Cespedes1afec691997-08-23 21:31:46 +020026Increase the debugging level.
Juan Cespedes07461b61997-08-22 15:29:10 +020027.TP
Juan Cespedes5e01f651998-03-08 22:31:44 +010028.I \-f
29Trace child processes as they are created by
30currently traced processes as a result of the fork(2)
31or clone(2) system calls.
32The new process is attached as soon as its pid is known.
33.TP
Juan Cespedesac3db291998-04-25 14:31:58 +020034.I \-i
35Print the instruction pointer at the time of the library call.
36.TP
Juan Cespedes5e01f651998-03-08 22:31:44 +010037.I \-L
38DON'T display library calls (use it with the
39.I \-S
40option).
41.TP
Juan Cespedes5e4455b1997-08-24 01:48:26 +020042.I \-S
43Display system calls as well as library calls
44.TP
Juan Cespedes5e0acdb1998-04-04 08:34:07 +020045.I \-t
46Prefix each line of the trace with the time of day.
47.TP
48.I \-tt
49If given twice, the time printed will include the microseconds.
50.TP
51.I \-ttt
52If given thrice, the time printed will include the microseconds and
53the leading portion will be printed as the number of seconds since the
54epoch.
55.TP
Juan Cespedesac3db291998-04-25 14:31:58 +020056.I \-C, \-\-demangle
57Decode (demangle) low-level symbol names into user-level names.
58Besides removing any initial underscore prepended by the system,
59this makes C++ function names readable.
60.TP
61.I \-a, \-\-align column
Juan Cespedese1887051998-03-10 00:08:41 +010062Align return values in a secific column (default column 50).
63.TP
64.I \-s
65Specify the maximum string size to print (the default is 32).
66.TP
Juan Cespedesac3db291998-04-25 14:31:58 +020067.I \-o, \-\-output filename
Juan Cespedes07461b61997-08-22 15:29:10 +020068Write the trace output to the file
69.I filename
70rather than to stderr.
Juan Cespedese1887051998-03-10 00:08:41 +010071.TP
72.I \-u username
73Run command with the userid, groupid and supplementary groups of
74.IR username .
75This option is only useful when running as root and enables the
76correct execution of setuid and/or setgid binaries.
77.TP
78.I \-p pid
79Attach to the process with the process ID
80.I pid
81and begin tracing.
Juan Cespedesac3db291998-04-25 14:31:58 +020082.TP
83.I \-e expr
84A qualifying expression which modifies which events to trace.
85The format of the expression is:
86.br
87[!]value1[,value2]...
88.br
89where the values are the functions to trace. Using an exclamation
90mark negates the set of values. For example
91.I \-e printf
92means to trace only the printf library call. By contrast,
93.I \-e !printf
94means to trace every library call except printf.
95.LP
96Note that some shells use the exclamation point for history
97expansion; even inside quoted arguments. If so, you must escape
98the exclamation point with a backslash.
99.TP
100.I \-h, \-\-help
101Show a summary of the options to ltrace and exit.
102.TP
103.I \-V, \-\-version
104Show the version number of ltrace and exit.
Juan Cespedes07461b61997-08-22 15:29:10 +0200105
106.SH BUGS
Juan Cespedesac3db291998-04-25 14:31:58 +0200107It has most of the bugs stated in
108.BR strace(1) .
109.LP
110Manual page and documentation are not very up-to-date.
111.LP
112Option -f sometimes fails to trace some children.
113.LP
114Only Linux/i386 is supported
115.LP
116Only ELF32 binaries are supported
Juan Cespedes07461b61997-08-22 15:29:10 +0200117.PP
Juan Cespedes3268a161997-08-25 16:45:22 +0200118If you like to report a bug, send a notice to the author, or use the
119.BR bug(1)
Juan Cespedesac3db291998-04-25 14:31:58 +0200120program if you are under the Debian GNU/Linux distribution.
Juan Cespedes07461b61997-08-22 15:29:10 +0200121
Juan Cespedes5e01f651998-03-08 22:31:44 +0100122.SH FILES
123.TP
124.I /etc/ltrace.conf
125System configuration file
126.TP
127.I ~/.ltrace.conf
128Personal config file, overrides
129.I /etc/ltrace.conf
130
Juan Cespedes07461b61997-08-22 15:29:10 +0200131.SH AUTHOR
Juan Cespedes64e793b1997-09-11 23:22:36 +0200132Juan Cespedes <cespedes@debian.org>
Juan Cespedes07461b61997-08-22 15:29:10 +0200133
134.SH "SEE ALSO"
135.BR strace(1) ,
136.BR ptrace(2)
137