- AMD64 (a.k.a. x86-64) are supported, but not as well.
- Older PowerPC machines are not supported.
- It requires Mac OS X 10.5 Leopard or later. Porting to 10.4 is not
- planned because it would require work and 10.4 is only becoming less common.
+ planned because it would require work and 10.4 is only becoming less
+ common.
Things that don't work:
- Helgrind and Ptrcheck
Hijack's fault. See https://bugs.kde.org/show_bug.cgi?id=193917 for
details and a simple work-around.
+ Usage notes:
+ - You will likely find --dsymutil=yes a useful option, as error messages may
+ be imprecise without it.
+
Many thanks to Greg Parker for developing this port over several years.
* XXX: something about improved Wine support?
}
/* There was no dsym file, or it doesn't match. We'll have to try
- regenerating it, unless auto-run-dsymutil is disabled, in which
- case just complain instead. */
+ regenerating it, unless --dsymutil=no, in which case just complain
+ instead. */
/* If this looks like a lib that we shouldn't run dsymutil on, just
give up. (possible reasons: is system lib, or in /usr etc, or
if (is_systemish_library_name(di->filename))
goto success;
- if (!VG_(clo_auto_run_dsymutil)) {
+ if (!VG_(clo_dsymutil)) {
if (VG_(clo_verbosity) == 1) {
VG_(message)(Vg_DebugMsg, "%s:\n", di->filename);
}
if (VG_(clo_verbosity) > 0)
VG_(message)(Vg_DebugMsg, "%sdSYM directory %s; consider using "
- "--auto-run-dsymutil=yes\n",
+ "--dsymutil=yes\n",
VG_(clo_verbosity) > 1 ? " " : "",
dsymfilename ? "has wrong UUID" : "is missing");
goto success;
Char* usage1 =
"usage: valgrind [options] prog-and-args\n"
"\n"
-" common user options for all Valgrind tools, with defaults in [ ]:\n"
+" tool-selection option, with default in [ ]:\n"
" --tool=<name> use the Valgrind tool named <name> [memcheck]\n"
+"\n"
+" basic user options for all Valgrind tools, with defaults in [ ]:\n"
" -h --help show this message\n"
" --help-debug show this message, plus debugging options\n"
" --version show version\n"
" -q --quiet run silently; only print error msgs\n"
" -v --verbose be more verbose, incl counts of errors\n"
" --trace-children=no|yes Valgrind-ise child processes (follow execve)? [no]\n"
-" --child-silent-after-fork=no|yes omit child output between fork & exec? [no]\n"
+" --child-silent-after-fork=no|yes omit child output between fork & exec? [no]\n"
" --track-fds=no|yes track open file descriptors? [no]\n"
" --time-stamp=no|yes add timestamps to log messages? [no]\n"
" --log-fd=<number> log messages to file descriptor [2=stderr]\n"
" --log-file=<file> log messages to <file>\n"
" --log-socket=ipaddr:port log messages to socket ipaddr:port\n"
"\n"
-" uncommon user options for all Valgrind tools:\n"
-" --run-libc-freeres=no|yes free up glibc memory at exit? [yes]\n"
-" --sim-hints=hint1,hint2,... known hints:\n"
-" lax-ioctls, enable-outer [none]\n"
-" --show-emwarns=no|yes show warnings about emulation limits? [no]\n"
-" --smc-check=none|stack|all checks for self-modifying code: none,\n"
-" only for code found in stacks, or all [stack]\n"
-" --kernel-variant=variant1,variant2,... known variants: bproc [none]\n"
-" handle non-standard kernel variants\n"
-" --read-var-info=yes|no read debug info on stack and global variables\n"
-" and use it to print better error messages in\n"
-" tools that make use of it (Memcheck, Helgrind,\n"
-" DRD)\n"
-"\n"
" user options for Valgrind tools that report errors:\n"
" --xml=yes emit error output in XML (some tools only)\n"
" --xml-fd=<number> XML output to file descriptor\n"
" --db-attach=no|yes start debugger when errors detected? [no]\n"
" --db-command=<command> command to start debugger [%s -nw %%f %%p]\n"
" --input-fd=<number> file descriptor for input [0=stdin]\n"
+" --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]\n"
" --max-stackframe=<number> assume stack switch for SP changes larger\n"
" than <number> bytes [2000000]\n"
" --main-stacksize=<number> set size of main thread's stack (in bytes)\n"
" [use current 'ulimit' value]\n"
+"\n"
+" user options for Valgrind tools that replace malloc:\n"
+" --alignment=<number> set minimum alignment of heap allocations [%ld]\n"
+"\n"
+" uncommon user options for all Valgrind tools:\n"
+" --smc-check=none|stack|all checks for self-modifying code: none,\n"
+" only for code found in stacks, or all [stack]\n"
+" --read-var-info=yes|no read debug info on stack and global variables\n"
+" and use it to print better error messages in\n"
+" tools that make use of it (Memcheck, Helgrind,\n"
+" DRD)\n"
+" --run-libc-freeres=no|yes free up glibc memory at exit on Linux? [yes]\n"
+" --sim-hints=hint1,hint2,... known hints:\n"
+" lax-ioctls, enable-outer [none]\n"
+" --kernel-variant=variant1,variant2,... known variants: bproc [none]\n"
+" handle non-standard kernel variants\n"
+" --show-emwarns=no|yes show warnings about emulation limits? [no]\n"
"\n";
Char* usage2 =
"\n"
" debugging options for all Valgrind tools:\n"
+" -d show verbose debugging output\n"
" --sanity-level=<number> level of sanity checking to do [1]\n"
" --trace-flags=<XXXXXXXX> show generated code? (X = 0|1) [00000000]\n"
" --profile-flags=<XXXXXXXX> ditto, but for profiling (X = 0|1) [00000000]\n"
" --sym-offsets=yes|no show syms in form 'name+offset' ? [no]\n"
" --command-line-only=no|yes only use command line options [no]\n"
"\n"
-" --vex-iropt-verbosity 0 .. 9 [0]\n"
-" --vex-iropt-level 0 .. 2 [2]\n"
-" --vex-iropt-precise-memory-exns [no]\n"
-" --vex-iropt-unroll-thresh 0 .. 400 [120]\n"
-" --vex-guest-max-insns 1 .. 100 [50]\n"
-" --vex-guest-chase-thresh 0 .. 99 [10]\n"
-"\n"
+" Vex options for all Valgrind tools:\n"
+" --vex-iropt-verbosity=<0..9> [0]\n"
+" --vex-iropt-level=<0..2> [2]\n"
+" --vex-iropt-precise-memory-exns=no|yes [no]\n"
+" --vex-iropt-unroll-thresh=<0..400> [120]\n"
+" --vex-guest-max-insns=<1..100> [50]\n"
+" --vex-guest-chase-thresh=<0..99> [10]\n"
" --trace-flags and --profile-flags values (omit the middle space):\n"
" 1000 0000 show conversion into IR\n"
" 0100 0000 show after initial opt\n"
" debugging options for Valgrind tools that report errors\n"
" --dump-error=<number> show translation for basic block associated\n"
" with <number>'th error context [0=show none]\n"
+"\n"
+" debugging options for Valgrind tools that replace malloc:\n"
+" --trace-malloc=no|yes show client malloc details? [no]\n"
"\n";
Char* usage3 =
VG_(log_output_sink).fd = 1;
VG_(log_output_sink).is_socket = False;
- /* 'usage1' expects one char* argument */
- VG_(printf)(usage1, gdb_path);
+ /* 'usage1' expects one char* argument and one SizeT argument. */
+ VG_(printf)(usage1, gdb_path, VG_MIN_MALLOC_SZB);
if (VG_(details).name) {
VG_(printf)(" user options for %s:\n", VG_(details).name);
if (VG_(needs).command_line_options)
else if VG_XACT_CLO(arg, "--smc-check=all", VG_(clo_smc_check),
Vg_SmcAll);
- else if VG_STR_CLO (arg, "--kernel-variant", VG_(clo_kernel_variant)) {}
+ else if VG_STR_CLO (arg, "--kernel-variant", VG_(clo_kernel_variant)) {}
- else if VG_BOOL_CLO(arg, "--auto-run-dsymutil",
- VG_(clo_auto_run_dsymutil)) {}
+ else if VG_BOOL_CLO(arg, "--dsymutil", VG_(clo_dsymutil)) {}
else if VG_BINT_CLO(arg, "--vex-iropt-verbosity",
VG_(clo_vex_control).iropt_verbosity, 0, 10) {}
Bool VG_(clo_wait_for_gdb) = False;
VgSmc VG_(clo_smc_check) = Vg_SmcStack;
HChar* VG_(clo_kernel_variant) = NULL;
-Bool VG_(clo_auto_run_dsymutil) = False;
+Bool VG_(clo_dsymutil) = False;
/*====================================================================*/
return True;
}
-void VG_(replacement_malloc_print_usage)(void)
-{
- VG_(printf)(
-" --alignment=<number> set minimum alignment of allocations [%d]\n",
- VG_MIN_MALLOC_SZB
- );
-}
-
-void VG_(replacement_malloc_print_debug_usage)(void)
-{
- VG_(printf)(
-" --trace-malloc=no|yes show client malloc details? [no]\n"
- );
-}
-
/*------------------------------------------------------------*/
/*--- Useful functions ---*/
/*------------------------------------------------------------*/
/* Darwin-specific: automatically run /usr/bin/dsymutil to update
.dSYM directories as necessary? */
-extern Bool VG_(clo_auto_run_dsymutil);
+extern Bool VG_(clo_dsymutil);
/* --------- Functions --------- */
<varlistentry>
<term><command><computeroutput>VALGRIND_PRINTF_BACKTRACE(format, ...)</computeroutput>:</command></term>
<listitem>
- <para>Like <computeroutput>VALGRIND_PRINTF<computeroutput>, but prints
+ <para>Like <computeroutput>VALGRIND_PRINTF</computeroutput>, but prints
a stack backtrace immediately afterwards.</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
- <varlistentry id="opt.d" xreflabel="-d">
- <term><option>-d</option></term>
- <listitem>
- <para>Emit information for debugging Valgrind itself. This is
- usually only of interest to the Valgrind developers. Repeating
- the flag produces more detailed output. If you want to send us a
- bug report, a log of the output generated by
- <option>-v -v -d -d</option> will make your report more
- useful.</para>
- </listitem>
- </varlistentry>
-
<varlistentry id="opt.trace-children" xreflabel="--trace-children">
<term>
<option><![CDATA[--trace-children=<yes|no> [default: no] ]]></option>
</listitem>
</varlistentry>
- <varlistentry id="opt.auto-run-dsymutil" xreflabel="--auto-run-dsymutil">
+ <varlistentry id="opt.dsymutil" xreflabel="--dsymutil">
<term>
- <option><![CDATA[--auto-run-dsymutil=no|yes [no] ]]></option>
+ <option><![CDATA[--dsymutil=no|yes [no] ]]></option>
</term>
<listitem>
<para>This flag is only relevant when running Valgrind on
executable or <computeroutput>.dylib</computeroutput>, but with
the extension <computeroutput>.dSYM</computeroutput>.</para>
- <para>With <option>--auto-run-dsymutil=no</option>, Valgrind
+ <para>With <option>--dsymutil=no</option>, Valgrind
will detect cases where the
<computeroutput>.dSYM</computeroutput> directory is either
missing, or is present but does not appear to match the
most likely because it is out of date. In these cases, Valgrind
will print a warning message but take no further action.</para>
- <para>With <option>--auto-run-dsymutil=yes</option>, Valgrind
+ <para>With <option>--dsymutil=yes</option>, Valgrind
will, in such cases, automatically
run <computeroutput>dsymutil</computeroutput> as necessary to
bring the debuginfo up to date. For all practical purposes, if
- you always use <option>--auto-run-dsymutil=yes</option>, then
+ you always use <option>--dsymutil=yes</option>, then
there is never any need to
run <computeroutput>dsymutil</computeroutput> manually or as part
of your applications's build system, since Valgrind will run it
directories.</para>
<para>Be careful when
- using <option>--auto-run-dsymutil=yes</option>, since it will
+ using <option>--dsymutil=yes</option>, since it will
cause pre-existing <computeroutput>.dSYM</computeroutput>
directories to be silently deleted and re-created. Also note the
<computeroutput>dsymutil</computeroutput> is quite slow, sometimes
<variablelist id="uncommon.opts.list">
+ <varlistentry id="opt.smc-check" xreflabel="--smc-check">
+ <term>
+ <option><![CDATA[--smc-check=<none|stack|all> [default: stack] ]]></option>
+ </term>
+ <listitem>
+ <para>This option controls Valgrind's detection of self-modifying
+ code. If no checking is done, if a program executes some code, then
+ overwrites it with new code, and executes the new code, Valgrind will
+ continue to execute the translations it made for the old code. This
+ will likely lead to incorrect behaviour and/or crashes.</para>
+
+ <para>Valgrind has three levels of self-modifying code detection:
+ no detection, detect self-modifying code on the stack (which used by
+ GCC to implement nested functions), or detect self-modifying code
+ everywhere. Note that the default option will catch the vast majority
+ of cases. The main case it will not catch is programs such as JIT
+ compilers that dynamically generate code <emphasis>and</emphasis>
+ subsequently overwrite part or all of it. Running with
+ <varname>all</varname> will slow Valgrind down greatly. Running with
+ <varname>none</varname> will rarely speed things up, since very little
+ code gets put on the stack for most programs. The
+ <function>VALGRIND_DISCARD_TRANSLATIONS</function> client request is
+ an alternative to <option>--smc-check=all</option> that requires more
+ effort but is much faster; see <xref
+ linkend="manual-core-adv.clientreq"/> for more details.</para>
+
+ <para>Some architectures (including ppc32 and ppc64) require
+ programs which create code at runtime to flush the instruction
+ cache in between code generation and first use. Valgrind
+ observes and honours such instructions. Hence, on ppc32/Linux
+ and ppc64/Linux, Valgrind always provides complete, transparent
+ support for self-modifying code. It is only on platforms such as
+ x86/Linux, AMD64/Linux and x86/Darwin that you need to use this
+ flag.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="opt.read-var-info" xreflabel="--read-var-info">
+ <term>
+ <option><![CDATA[--read-var-info=<yes|no> [default: no] ]]></option>
+ </term>
+ <listitem>
+ <para>When enabled, Valgrind will read information about variables from
+ debug info. This slows Valgrind down and makes it use more memory, but
+ for the tools that can take advantage of it (Memcheck, Helgrind, DRD) it
+ can result in more precise error messages. For example, here are some
+ standard errors issued by Memcheck:</para>
+<programlisting><![CDATA[
+==15516== Uninitialised byte(s) found during client check request
+==15516== at 0x400633: croak (varinfo1.c:28)
+==15516== by 0x4006B2: main (varinfo1.c:55)
+==15516== Address 0x60103b is 7 bytes inside data symbol "global_i2"
+==15516==
+==15516== Uninitialised byte(s) found during client check request
+==15516== at 0x400633: croak (varinfo1.c:28)
+==15516== by 0x4006BC: main (varinfo1.c:56)
+==15516== Address 0x7fefffefc is on thread 1's stack]]></programlisting>
+
+ <para>And here are the same errors with
+ <option>--read-var-info=yes</option>:</para>
+
+<programlisting><![CDATA[
+==15522== Uninitialised byte(s) found during client check request
+==15522== at 0x400633: croak (varinfo1.c:28)
+==15522== by 0x4006B2: main (varinfo1.c:55)
+==15522== Location 0x60103b is 0 bytes inside global_i2[7],
+==15522== a global variable declared at varinfo1.c:41
+==15522==
+==15522== Uninitialised byte(s) found during client check request
+==15522== at 0x400633: croak (varinfo1.c:28)
+==15522== by 0x4006BC: main (varinfo1.c:56)
+==15522== Location 0x7fefffefc is 0 bytes inside local var "local"
+==15522== declared at varinfo1.c:46, in frame #1 of thread 1]]></programlisting>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="opt.run-libc-freeres" xreflabel="--run-libc-freeres">
<term>
<option><![CDATA[--run-libc-freeres=<yes|no> [default: yes] ]]></option>
</listitem>
</varlistentry>
- <varlistentry id="opt.smc-check" xreflabel="--smc-check">
- <term>
- <option><![CDATA[--smc-check=<none|stack|all> [default: stack] ]]></option>
- </term>
- <listitem>
- <para>This option controls Valgrind's detection of self-modifying
- code. If no checking is done, if a program executes some code, then
- overwrites it with new code, and executes the new code, Valgrind will
- continue to execute the translations it made for the old code. This
- will likely lead to incorrect behaviour and/or crashes.</para>
-
- <para>Valgrind has three levels of self-modifying code detection:
- no detection, detect self-modifying code on the stack (which used by
- GCC to implement nested functions), or detect self-modifying code
- everywhere. Note that the default option will catch the vast majority
- of cases. The main case it will not catch is programs such as JIT
- compilers that dynamically generate code <emphasis>and</emphasis>
- subsequently overwrite part or all of it. Running with
- <varname>all</varname> will slow Valgrind down greatly. Running with
- <varname>none</varname> will rarely speed things up, since very little
- code gets put on the stack for most programs. The
- <function>VALGRIND_DISCARD_TRANSLATIONS</function> client request is
- an alternative to <option>--smc-check=all</option> that requires more
- effort but is much faster; see <xref
- linkend="manual-core-adv.clientreq"/> for more details.</para>
-
- <para>Some architectures (including ppc32 and ppc64) require
- programs which create code at runtime to flush the instruction
- cache in between code generation and first use. Valgrind
- observes and honours such instructions. Hence, on ppc32/Linux
- and ppc64/Linux, Valgrind always provides complete, transparent
- support for self-modifying code. It is only on platforms such as
- x86/Linux, AMD64/Linux and x86/Darwin that you need to use this
- flag.</para>
- </listitem>
- </varlistentry>
-
</variablelist>
<!-- end of xi:include in the manpage -->
" --trace-semaphore=yes|no Trace all semaphore activity [no].\n",
DRD_(thread_get_segment_merge_interval)()
);
- VG_(replacement_malloc_print_usage)();
}
static void DRD_(print_debug_usage)(void)
" --trace-segment=yes|no Trace segment actions [no].\n"
" --trace-suppr=yes|no Trace all address suppression actions [no].\n"
);
- VG_(replacement_malloc_print_debug_usage)();
}
" --partial-loads-ok=no|yes same as for Memcheck [yes]\n"
" --enable-sg-checks=no|yes enable stack & global array checking? [yes]\n"
);
- VG_(replacement_malloc_print_usage)();
}
void pc_print_debug_usage(void)
{
- /*
VG_(printf)(
- " --lossage-check=no|yes gather stats for quality control [no]\n"
+" (none)\n"
+//" --lossage-check=no|yes gather stats for quality control [no]\n"
);
- */
- VG_(replacement_malloc_print_debug_usage)();
}
" none: only show trace for one thread in a race (fastest)\n"
" --conflict-cache-size=N size of 'full' history cache [1000000]\n"
);
- VG_(replacement_malloc_print_usage)();
}
static void hg_print_debug_usage ( void )
{
- VG_(replacement_malloc_print_debug_usage)();
VG_(printf)(" --cmp-race-err-addrs=no|yes are data addresses in "
"race errors significant? [no]\n");
VG_(printf)(" --hg-sanity-flags=<XXXXXX> sanity check "
extern UInt VG_(clo_alignment);
extern Bool VG_(replacement_malloc_process_cmd_line_option) ( Char* arg );
-extern void VG_(replacement_malloc_print_usage) ( void );
-extern void VG_(replacement_malloc_print_debug_usage) ( void );
#endif // __PUB_TOOL_REPLACEMALLOC_H
" --max-snapshots=<N> maximum number of snapshots recorded [100]\n"
" --massif-out-file=<file> output file name [massif.out.%%p]\n"
);
- VG_(replacement_malloc_print_usage)();
}
static void ms_print_debug_usage(void)
{
- VG_(replacement_malloc_print_debug_usage)();
+ VG_(printf)(
+" (none)\n"
+ );
}
" --malloc-fill=<hexnumber> fill malloc'd areas with given value\n"
" --free-fill=<hexnumber> fill free'd areas with given value\n"
);
- VG_(replacement_malloc_print_usage)();
}
static void mc_print_debug_usage(void)
{
- VG_(replacement_malloc_print_debug_usage)();
+ VG_(printf)(
+" (none)\n"
+ );
}
dist_noinst_SCRIPTS = \
filter_cmdline0 \
+ filter_cmdline1 \
filter_fdleak \
filter_linenos \
filter_none_discards \
usage: valgrind [options] prog-and-args
- common user options for all Valgrind tools, with defaults in [ ]:
+ tool-selection option, with default in [ ]:
--tool=<name> use the Valgrind tool named <name> [memcheck]
+
+ basic user options for all Valgrind tools, with defaults in [ ]:
-h --help show this message
--help-debug show this message, plus debugging options
--version show version
-q --quiet run silently; only print error msgs
-v --verbose be more verbose, incl counts of errors
--trace-children=no|yes Valgrind-ise child processes (follow execve)? [no]
- --child-silent-after-fork=no|yes omit child output between fork & exec? [no]
+ --child-silent-after-fork=no|yes omit child output between fork & exec? [no]
--track-fds=no|yes track open file descriptors? [no]
--time-stamp=no|yes add timestamps to log messages? [no]
--log-fd=<number> log messages to file descriptor [2=stderr]
--log-file=<file> log messages to <file>
--log-socket=ipaddr:port log messages to socket ipaddr:port
- uncommon user options for all Valgrind tools:
- --run-libc-freeres=no|yes free up glibc memory at exit? [yes]
- --sim-hints=hint1,hint2,... known hints:
- lax-ioctls, enable-outer [none]
- --show-emwarns=no|yes show warnings about emulation limits? [no]
- --smc-check=none|stack|all checks for self-modifying code: none,
- only for code found in stacks, or all [stack]
- --kernel-variant=variant1,variant2,... known variants: bproc [none]
- handle non-standard kernel variants
- --read-var-info=yes|no read debug info on stack and global variables
- and use it to print better error messages in
- tools that make use of it (Memcheck, Helgrind,
- DRD)
-
user options for Valgrind tools that report errors:
--xml=yes emit error output in XML (some tools only)
--xml-fd=<number> XML output to file descriptor
--db-attach=no|yes start debugger when errors detected? [no]
--db-command=<command> command to start debugger [/usr/bin/gdb -nw %f %p]
--input-fd=<number> file descriptor for input [0=stdin]
+ --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]
--max-stackframe=<number> assume stack switch for SP changes larger
than <number> bytes [2000000]
--main-stacksize=<number> set size of main thread's stack (in bytes)
[use current 'ulimit' value]
+ user options for Valgrind tools that replace malloc:
+ --alignment=<number> set minimum alignment of heap allocations [...]
+
+ uncommon user options for all Valgrind tools:
+ --smc-check=none|stack|all checks for self-modifying code: none,
+ only for code found in stacks, or all [stack]
+ --read-var-info=yes|no read debug info on stack and global variables
+ and use it to print better error messages in
+ tools that make use of it (Memcheck, Helgrind,
+ DRD)
+ --run-libc-freeres=no|yes free up glibc memory at exit on Linux? [yes]
+ --sim-hints=hint1,hint2,... known hints:
+ lax-ioctls, enable-outer [none]
+ --kernel-variant=variant1,variant2,... known variants: bproc [none]
+ handle non-standard kernel variants
+ --show-emwarns=no|yes show warnings about emulation limits? [no]
+
user options for Nulgrind:
(none)
vgopts: --help --tool=none
+stdout_filter: filter_cmdline1
usage: valgrind [options] prog-and-args
- common user options for all Valgrind tools, with defaults in [ ]:
+ tool-selection option, with default in [ ]:
--tool=<name> use the Valgrind tool named <name> [memcheck]
+
+ basic user options for all Valgrind tools, with defaults in [ ]:
-h --help show this message
--help-debug show this message, plus debugging options
--version show version
-q --quiet run silently; only print error msgs
-v --verbose be more verbose, incl counts of errors
--trace-children=no|yes Valgrind-ise child processes (follow execve)? [no]
- --child-silent-after-fork=no|yes omit child output between fork & exec? [no]
+ --child-silent-after-fork=no|yes omit child output between fork & exec? [no]
--track-fds=no|yes track open file descriptors? [no]
--time-stamp=no|yes add timestamps to log messages? [no]
--log-fd=<number> log messages to file descriptor [2=stderr]
--log-file=<file> log messages to <file>
--log-socket=ipaddr:port log messages to socket ipaddr:port
- uncommon user options for all Valgrind tools:
- --run-libc-freeres=no|yes free up glibc memory at exit? [yes]
- --sim-hints=hint1,hint2,... known hints:
- lax-ioctls, enable-outer [none]
- --show-emwarns=no|yes show warnings about emulation limits? [no]
- --smc-check=none|stack|all checks for self-modifying code: none,
- only for code found in stacks, or all [stack]
- --kernel-variant=variant1,variant2,... known variants: bproc [none]
- handle non-standard kernel variants
- --read-var-info=yes|no read debug info on stack and global variables
- and use it to print better error messages in
- tools that make use of it (Memcheck, Helgrind,
- DRD)
-
user options for Valgrind tools that report errors:
--xml=yes emit error output in XML (some tools only)
--xml-fd=<number> XML output to file descriptor
--db-attach=no|yes start debugger when errors detected? [no]
--db-command=<command> command to start debugger [/usr/bin/gdb -nw %f %p]
--input-fd=<number> file descriptor for input [0=stdin]
+ --dsymutil=no|yes run dsymutil on Mac OS X when helpful? [no]
--max-stackframe=<number> assume stack switch for SP changes larger
than <number> bytes [2000000]
--main-stacksize=<number> set size of main thread's stack (in bytes)
[use current 'ulimit' value]
+ user options for Valgrind tools that replace malloc:
+ --alignment=<number> set minimum alignment of heap allocations [...]
+
+ uncommon user options for all Valgrind tools:
+ --smc-check=none|stack|all checks for self-modifying code: none,
+ only for code found in stacks, or all [stack]
+ --read-var-info=yes|no read debug info on stack and global variables
+ and use it to print better error messages in
+ tools that make use of it (Memcheck, Helgrind,
+ DRD)
+ --run-libc-freeres=no|yes free up glibc memory at exit on Linux? [yes]
+ --sim-hints=hint1,hint2,... known hints:
+ lax-ioctls, enable-outer [none]
+ --kernel-variant=variant1,variant2,... known variants: bproc [none]
+ handle non-standard kernel variants
+ --show-emwarns=no|yes show warnings about emulation limits? [no]
+
user options for Nulgrind:
(none)
debugging options for all Valgrind tools:
+ -d show verbose debugging output
--sanity-level=<number> level of sanity checking to do [1]
--trace-flags=<XXXXXXXX> show generated code? (X = 0|1) [00000000]
--profile-flags=<XXXXXXXX> ditto, but for profiling (X = 0|1) [00000000]
--sym-offsets=yes|no show syms in form 'name+offset' ? [no]
--command-line-only=no|yes only use command line options [no]
- --vex-iropt-verbosity 0 .. 9 [0]
- --vex-iropt-level 0 .. 2 [2]
- --vex-iropt-precise-memory-exns [no]
- --vex-iropt-unroll-thresh 0 .. 400 [120]
- --vex-guest-max-insns 1 .. 100 [50]
- --vex-guest-chase-thresh 0 .. 99 [10]
-
+ Vex options for all Valgrind tools:
+ --vex-iropt-verbosity=<0..9> [0]
+ --vex-iropt-level=<0..2> [2]
+ --vex-iropt-precise-memory-exns=no|yes [no]
+ --vex-iropt-unroll-thresh=<0..400> [120]
+ --vex-guest-max-insns=<1..100> [50]
+ --vex-guest-chase-thresh=<0..99> [10]
--trace-flags and --profile-flags values (omit the middle space):
1000 0000 show conversion into IR
0100 0000 show after initial opt
--dump-error=<number> show translation for basic block associated
with <number>'th error context [0=show none]
+ debugging options for Valgrind tools that replace malloc:
+ --trace-malloc=no|yes show client malloc details? [no]
+
debugging options for Nulgrind:
(none)
vgopts: --help-debug --tool=none
+stdout_filter: filter_cmdline1
--- /dev/null
+#! /bin/sh
+
+perl -p -e 's/(set minimum alignment of heap allocations) \[(8|16)\]/$1 [...]/'
+