Using and understanding the Valgrind core
--version
Show the version number of the Valgrind core. Tools can have their own version numbers. There is a scheme in place
to ensure that tools only execute when the core version is one they are known to work with. This was done to minimise
the chances of strange problems arising from tool-vs-core version incompatibilities.
-q
,
--quiet
Run silently, and only print error messages. Useful if you are running regression tests or have some other automated
test machinery.
-v
,
--verbose
Be more verbose. Gives extra information on various aspects of your program, such as: the shared objects loaded, the
suppressions used, the progress of the instrumentation and execution engines, and warnings about unusual behaviour.
Repeating the option increases the verbosity level.
--trace-children=<yes|no> [default:
no]
When enabled, Valgrind will trace into sub-processes initiated via the
exec
system call.
This is necessary for
multi-process programs.
Note that Valgrind does trace into the child of a
fork
(it would be difficult not to, since
fork
makes an identical
copy of a process), so this option is arguably badly named. However, most children of
fork
calls immediately call
exec
anyway.
--trace-children-skip=patt1,patt2,...
This option only has an effect when
--trace-children=yes
is specified.
It allows for some children to be
skipped. The option takes a comma separated list of patterns for the names of child executables that Valgrind should
not trace into. Patterns may include the metacharacters
?
and
*
, which have the usual meaning.
This can be useful for pruning uninteresting branches from a tree of processes being run on Valgrind. But you should
be careful when using it. When Valgrind skips tracing into an executable, it doesn’t just skip tracing that executable,
it also skips tracing any of that executable’s child processes. In other words, the flag doesn’t merely cause tracing to
stop at the specified executables -- it skips tracing of entire process subtrees rooted at any of the specified executables.
--trace-children-skip-by-arg=patt1,patt2,...
This is the same as
--trace-children-skip
, with one difference: the decision as to whether to trace into a
child process is made by examining the arguments to the child process, rather than the name of its executable.
--child-silent-after-fork=<yes|no> [default:
no]
When enabled, Valgrind will not show any debugging or logging output for the child process resulting from a
fork
call.
This can make the output less confusing (although more misleading) when dealing with processes that create
children. It is particularly useful in conjunction with
--trace-children=
. Use of this option is also strongly
recommended if you are requesting XML output (
--xml=yes
), since otherwise the XML from child and parent may
become mixed up, which usually makes it useless.
--vgdb=<no|yes|full> [default:
yes]
Valgrind will provide "gdbserver" functionality when
--vgdb=yes
or
--vgdb=full
is specified.
This allows
an external GNU GDB debugger to control and debug your program when it runs on Valgrind.
--vgdb=full
incurs significant performance overheads, but provides more precise breakpoints and watchpoints. See
Debugging
your program using Valgrind’s gdbserver and GDB
for a detailed description.
If the embedded gdbserver is enabled but no gdb is currently being used, the
vgdb
command line utility can send
"monitor commands" to Valgrind from a shell. The Valgrind core provides a set of
Valgrind monitor commands
. A
tool can optionally provide tool specific monitor commands, which are documented in the tool specific chapter.
10
Содержание BBV
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...