| Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications by J. Seward, N. Nethercote, J. Weidendorfer and the Valgrind Development Team Paperback (6"x9"), 164 pages ISBN 0954612051 RRP £12.95 ($19.95) |
3.6.2 Basic Options
These options work with all tools.
-h --helpShow help for all options, both for the core and for the selected tool.--help-debugSame as--help, but also lists debugging options which usually are only of use to Valgrind's developers.--versionShow 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 --quietRun silently, and only print error messages. Useful if you are running regression tests or have some other automated test machinery.-v --verboseBe 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 flag increases the verbosity level.-dEmit 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-v -v -d -dwill make your report more useful.--tool=<toolname> [default: memcheck]Run the Valgrind tool calledtoolname, e.g. Memcheck, Cachegrind, etc.--trace-children=<yes|no> [default: no]When enabled, Valgrind will trace into sub-processes initiated via theexecsystem call. This can be confusing and isn't usually what you want, so it is disabled by default. Note that Valgrind does trace into the child of afork(it would be difficult not to, sinceforkmakes an identical copy of a process), so this option is arguably badly named. However, most children offorkcalls immediately callexecanyway.--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 aforkcall. 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 flag 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.--track-fds=<yes|no> [default: no]When enabled, Valgrind will print out a list of open file descriptors on exit. Along with each file descriptor is printed a stack backtrace of where the file was opened and any details relating to the file descriptor such as the file name or socket details.--time-stamp=<yes|no> [default: no]When enabled, each message is preceded with an indication of the elapsed wallclock time since startup, expressed as days, hours, minutes, seconds and milliseconds.--log-fd=<number> [default: 2, stderr]Specifies that Valgrind should send all of its messages to the specified file descriptor. The default, 2, is the standard error channel (stderr). Note that this may interfere with the client's own use of stderr, as Valgrind's output will be interleaved with any output that the client sends to stderr.--log-file=<filename>Specifies that Valgrind should send all of its messages to the specified file. If the file name is empty, it causes an abort. There are three special format specifiers that can be used in the file name.%pis replaced with the current process ID. This is very useful for program that invoke multiple processes. warning: If you use--trace-children=yesand your program invokes multiple processes and you don't use this specifier (or the%qspecifier below), the Valgrind output from all those processes will go into one file, possibly jumbled up, and possibly incomplete.%q{FOO}is replaced with the contents of the environment variableFOO. If the{FOO}part is malformed, it causes an abort. This specifier is rarely needed, but very useful in certain circumstances (e.g. when running MPI programs, see 5.8). The idea is that you specify a variable which will be set differently for each process in the job, for example ‘BPROC_RANK’ or whatever is applicable in your MPI setup. If the named environment variable is not set, it causes an abort. Note that in some shells, the{and}characters may need to be escaped with a backslash.%%is replaced with%. If an%is followed by any other character, it causes an abort.--log-socket=<ip-address:port-number>Specifies that Valgrind should send all of its messages to the specified port at the specified IP address. The port may be omitted, in which case port 1500 is used. If a connection cannot be made to the specified socket, Valgrind falls back to writing output to the standard error (stderr). This option is intended to be used in conjunction with the ‘valgrind-listener’ program. For further details, see the commentary (see 3.3) in the manual.
| ISBN 0954612051 | Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications | See the print edition |