@@ -111,35 +111,23 @@ static void usage_NORETURN ( Bool debug_help )
111
111
Char * usage1 =
112
112
"usage: valgrind [options] prog-and-args\n"
113
113
"\n"
114
- " common user options for all Valgrind tools , with defaults in [ ]:\n"
114
+ " tool-selection option , with default in [ ]:\n"
115
115
" --tool=<name> use the Valgrind tool named <name> [memcheck]\n"
116
+ "\n"
117
+ " basic user options for all Valgrind tools, with defaults in [ ]:\n"
116
118
" -h --help show this message\n"
117
119
" --help-debug show this message, plus debugging options\n"
118
120
" --version show version\n"
119
121
" -q --quiet run silently; only print error msgs\n"
120
122
" -v --verbose be more verbose, incl counts of errors\n"
121
123
" --trace-children=no|yes Valgrind-ise child processes (follow execve)? [no]\n"
122
- " --child-silent-after-fork=no|yes omit child output between fork & exec? [no]\n"
124
+ " --child-silent-after-fork=no|yes omit child output between fork & exec? [no]\n"
123
125
" --track-fds=no|yes track open file descriptors? [no]\n"
124
126
" --time-stamp=no|yes add timestamps to log messages? [no]\n"
125
127
" --log-fd=<number> log messages to file descriptor [2=stderr]\n"
126
128
" --log-file=<file> log messages to <file>\n"
127
129
" --log-socket=ipaddr:port log messages to socket ipaddr:port\n"
128
130
"\n"
129
- " uncommon user options for all Valgrind tools:\n"
130
- " --run-libc-freeres=no|yes free up glibc memory at exit? [yes]\n"
131
- " --sim-hints=hint1,hint2,... known hints:\n"
132
- " lax-ioctls, enable-outer [none]\n"
133
- " --show-emwarns=no|yes show warnings about emulation limits? [no]\n"
134
- " --smc-check=none|stack|all checks for self-modifying code: none,\n"
135
- " only for code found in stacks, or all [stack]\n"
136
- " --kernel-variant=variant1,variant2,... known variants: bproc [none]\n"
137
- " handle non-standard kernel variants\n"
138
- " --read-var-info=yes|no read debug info on stack and global variables\n"
139
- " and use it to print better error messages in\n"
140
- " tools that make use of it (Memcheck, Helgrind,\n"
141
- " DRD)\n"
142
- "\n"
143
131
" user options for Valgrind tools that report errors:\n"
144
132
" --xml=yes emit error output in XML (some tools only)\n"
145
133
" --xml-fd=<number> XML output to file descriptor\n"
@@ -156,15 +144,34 @@ static void usage_NORETURN ( Bool debug_help )
156
144
" --db-attach=no|yes start debugger when errors detected? [no]\n"
157
145
" --db-command=<command> command to start debugger [%s -nw %%f %%p]\n"
158
146
" --input-fd=<number> file descriptor for input [0=stdin]\n"
147
+ " --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]\n"
159
148
" --max-stackframe=<number> assume stack switch for SP changes larger\n"
160
149
" than <number> bytes [2000000]\n"
161
150
" --main-stacksize=<number> set size of main thread's stack (in bytes)\n"
162
151
" [use current 'ulimit' value]\n"
152
+ "\n"
153
+ " user options for Valgrind tools that replace malloc:\n"
154
+ " --alignment=<number> set minimum alignment of heap allocations [%ld]\n"
155
+ "\n"
156
+ " uncommon user options for all Valgrind tools:\n"
157
+ " --smc-check=none|stack|all checks for self-modifying code: none,\n"
158
+ " only for code found in stacks, or all [stack]\n"
159
+ " --read-var-info=yes|no read debug info on stack and global variables\n"
160
+ " and use it to print better error messages in\n"
161
+ " tools that make use of it (Memcheck, Helgrind,\n"
162
+ " DRD)\n"
163
+ " --run-libc-freeres=no|yes free up glibc memory at exit on Linux? [yes]\n"
164
+ " --sim-hints=hint1,hint2,... known hints:\n"
165
+ " lax-ioctls, enable-outer [none]\n"
166
+ " --kernel-variant=variant1,variant2,... known variants: bproc [none]\n"
167
+ " handle non-standard kernel variants\n"
168
+ " --show-emwarns=no|yes show warnings about emulation limits? [no]\n"
163
169
"\n" ;
164
170
165
171
Char * usage2 =
166
172
"\n"
167
173
" debugging options for all Valgrind tools:\n"
174
+ " -d show verbose debugging output\n"
168
175
" --sanity-level=<number> level of sanity checking to do [1]\n"
169
176
" --trace-flags=<XXXXXXXX> show generated code? (X = 0|1) [00000000]\n"
170
177
" --profile-flags=<XXXXXXXX> ditto, but for profiling (X = 0|1) [00000000]\n"
@@ -184,13 +191,13 @@ static void usage_NORETURN ( Bool debug_help )
184
191
" --sym-offsets=yes|no show syms in form 'name+offset' ? [no]\n"
185
192
" --command-line-only=no|yes only use command line options [no]\n"
186
193
"\n"
187
- " --vex-iropt-verbosity 0 .. 9 [0] \n"
188
- " --vex-iropt-level 0 .. 2 [2 ]\n"
189
- " --vex-iropt-precise-memory-exns [no ]\n"
190
- " --vex-iropt-unroll-thresh 0 .. 400 [120 ]\n"
191
- " --vex-guest-max-insns 1 .. 100 [50 ]\n"
192
- " --vex-guest-chase-thresh 0 .. 99 [10 ]\n"
193
- "\n"
194
+ " Vex options for all Valgrind tools: \n"
195
+ " --vex-iropt-verbosity=<0..9> [0 ]\n"
196
+ " --vex-iropt-level=<0..2> [2 ]\n"
197
+ " --vex-iropt-precise-memory-exns=no|yes [no ]\n"
198
+ " --vex-iropt-unroll-thresh=<0..400> [120 ]\n"
199
+ " --vex-guest-max-insns=<1..100> [50 ]\n"
200
+ " --vex-guest-chase-thresh=<0..99> [10] \n"
194
201
" --trace-flags and --profile-flags values (omit the middle space):\n"
195
202
" 1000 0000 show conversion into IR\n"
196
203
" 0100 0000 show after initial opt\n"
@@ -205,6 +212,9 @@ static void usage_NORETURN ( Bool debug_help )
205
212
" debugging options for Valgrind tools that report errors\n"
206
213
" --dump-error=<number> show translation for basic block associated\n"
207
214
" with <number>'th error context [0=show none]\n"
215
+ "\n"
216
+ " debugging options for Valgrind tools that replace malloc:\n"
217
+ " --trace-malloc=no|yes show client malloc details? [no]\n"
208
218
"\n" ;
209
219
210
220
Char * usage3 =
@@ -224,8 +234,8 @@ static void usage_NORETURN ( Bool debug_help )
224
234
VG_ (log_output_sink ).fd = 1 ;
225
235
VG_ (log_output_sink ).is_socket = False ;
226
236
227
- /* 'usage1' expects one char* argument */
228
- VG_ (printf )(usage1 , gdb_path );
237
+ /* 'usage1' expects one char* argument and one SizeT argument. */
238
+ VG_ (printf )(usage1 , gdb_path , VG_MIN_MALLOC_SZB );
229
239
if (VG_ (details ).name ) {
230
240
VG_ (printf )(" user options for %s:\n" , VG_ (details ).name );
231
241
if (VG_ (needs ).command_line_options )
@@ -474,10 +484,9 @@ void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
474
484
else if VG_XACT_CLO (arg , "--smc-check=all" , VG_ (clo_smc_check ),
475
485
Vg_SmcAll );
476
486
477
- else if VG_STR_CLO (arg , "--kernel-variant" , VG_ (clo_kernel_variant )) {}
487
+ else if VG_STR_CLO (arg , "--kernel-variant" , VG_ (clo_kernel_variant )) {}
478
488
479
- else if VG_BOOL_CLO (arg , "--auto-run-dsymutil" ,
480
- VG_ (clo_auto_run_dsymutil )) {}
489
+ else if VG_BOOL_CLO (arg , "--dsymutil" , VG_ (clo_dsymutil )) {}
481
490
482
491
else if VG_BINT_CLO (arg , "--vex-iropt-verbosity" ,
483
492
VG_ (clo_vex_control ).iropt_verbosity , 0 , 10 ) {}
0 commit comments