]> git.pld-linux.org Git - packages/dmalloc.git/blame - dmalloc.1
- up to 5.5.2
[packages/dmalloc.git] / dmalloc.1
CommitLineData
b7611b46 1.TH DMALLOC 1
2.SH NAME
3dmalloc \- program used to set the environment for debugging using the
4dmalloc debugging library.
5.SH SYNOPSIS
6.B dmalloc
7.I [options]
8.SH "DESCRIPTION"
9This manual page documents the
10.BR dmalloc
11command.
12It was written for the Debian GNU/Linux distribution based, almost verbatim,
13on the original documentation provided by the library in GNU Info format;
14see below.
15.PP
16The
17.B dmalloc
18program is designed to assist in the setting of the
19environment variable
20.B DMALLOC_OPTIONS.
21It is designed to print the shell commands necessary to make the
22appropriate changes to the environment. Unfortunately, it cannot make
23the changes on its own so the output from dmalloc should be sent
24through the `eval' shell command which will do the commands.
25
26With shells that have aliasing or macro capabilities: csh, bash, ksh,
27tcsh, zsh, etc., setting up an alias to dmalloc to do the eval call is
28recommended. Csh/tcsh users (for example) should put the following in
29their `.cshrc' file:
30
31alias dmalloc 'eval `\dmalloc -C \!*`'
32
33Bash and Zsh users on the other hand should put the following in
34their `.zshrc' file:
35
36function dmalloc { eval `command dmalloc -b $*` }
37
38This allows the user to execute the dmalloc command as `dmalloc
39arguments'.
40
41The most basic usage for the program is
42.B `dmalloc [-bC] tag'.
43 The
44.B `-b'
45or
46.B `-C'
47(either but not both flags used at a time) are for
48generating Bourne or C shell type commands respectively. dmalloc will
49try and use the
50.B `SHELL'
51environment variable to determine whether
52bourne or C shell commands should be generated but you may want to
53explicitly specify the correct flag.
54
55The
56.I tag
57argument to dmalloc should match a line from the user's
58run-time configuration file or should be one of the built-in tags.
59If no tag is specified and no other option-commands
60used, dmalloc will display the current settings of the environment
61variable. It is useful to specify one of the verbose options when doing
62this.
63
64To find out the usage for the debug malloc program try
65.B dmalloc \-\-usage\-long.
66The standardized usage message that will be displayed is
67one of the many features of the argv library included with this package.
68It is available via ftp from `ftp.letters.com' in the `/src/argv'
69directory. See `argv.info' there for more information.
70
71.SH OPTIONS
72.TP
73.B \-a
74.I address
75Set the `addr' part of the
76.B DMALLOC_OPTIONS
77variable to address (or alternatively address:number).
78.TP
79.B \-b
80Output Bourne shell type commands.
81.TP
82.B \-C
83Output C shell type commands.
84.TP
85.B \-c
86Clear/unset all of the settings not specified with other arguments.
87Clear will never unset the `debug' setting. Use
88.B \-d 0
89or a tag to `none' to achieve this.
90.TP
91.B \-d
92.I bitmask
93Set the `debug' part of the
94.B DMALLOC_OPTIONS
95env variable to the
96bitmask value which should be in hex. This is overridden (and
97unnecessary) if a tag is specified.
98.TP
99.B \-D
100List all of the debug-tokens. Useful for finding a token to be
101used with the
102.B \-p
103or
104.B \-m
105options. Use with
106.B \-v
107or
108.B \-V
109verbose options.
110.TP
111.B \-e
112.I errno
113Print the dmalloc error string that corresponds to the error number
114errno.
115.TP
116.B \-f
117.I filename
118Use this configuration file instead of the RC file
119.I ~/.dmallocrc.
120.TP
121.B \-i
122.I number
123Set the checking interval to number.
124.TP
125.B \-k
126Keep the settings when using a tag. This overrides
127.B \-r .
128.TP
129.B \-l
130.I filename
131Set the log-file to filename.
132.TP
133.B \-L
134Output the debug-value not in hex but by individual debug-tokens
135in long form.
136.TP
137.B \-m
138.I token(s)
139Remove (minus) the debug capabilities of token(s) from the current
140debug setting or from the selected tag (or
141.B \-d
142value). Multiple
143.B \-m's
144can be specified.
145.TP
146.B \-n
147Without changing the environment, output the commands resulting
148from the supplied options.
149.TP
150.B \-p
151.I token(s)
152Add (plus) the debug capabilities of token(s) to the current debug
153setting or to the selected tag (or
154.B \-d
155value). Multiple
156.B \-p's
157can be
158specified.
159.TP
160.B \-r
161Remove (unset) all settings when using a tag. This is useful when
162you are returning to a standard development tag and want the
163logfile, address, and interval settings to be cleared
164automatically. If you want this behavior by default, this can be
165put into the dmalloc alias.
166.TP
167.B \-s
168.I number
169Set the `start' part of the
170.B DMALLOC_OPTIONS
171env variable to
172number (alternatively `file:line').
173.TP
174.B \-S
175Output the debug-value not in hex but by individual debug-tokens
176in short form.
177.TP
178.B \-t
179List all of the tags in the rc-file. Use with
180.B \-v
181or
182.B \-V
183verbose options.
184.TP
185.B \-v
186Give verbose output. Especially useful when dumping current
187settings or listing all of the tags.
188.PP
189If no arguments are specified, dmalloc dumps out the current settings
190that you have for the environment variable. For example:
191
192 Debug-Flags '0x40005c7' (runtime)
193 Address 0x1f008, count = 3
194 Interval 100
195 Logpath 'malloc'
196 Start-File not-set
197
198With a
199.B -v
200option and no arguments, dmalloc dumps out the current
201settings in a verbose manner. For example:
202
203 Debug-Flags '0x40005c7' (runtime)
204 log-stats, log-non-free, log-blocks, log-unknown,
205 log-bad-space, check-fence, catch-null
206 Address 0x1f008, count = 10
207 Interval 100
208 Logpath 'malloc'
209 Start-File not-set
210
211.SH "SEE ALSO"
212The documetation for the library is in GNU Info format. Please check the
213file
214.IR /usr/info/dmalloc.info.gz
215for more details.
216
217.SH FILES
218.TP
219.I /usr/info/dmalloc.info.gz
220The real documentation for the dmalloc library.
221.TP
222.I ~/.dmallocrc
223User's configuration file.
224.SH AUTHOR
225