Using and understanding the Valgrind core: Advanced Topics
•
--port=<portnr>
instructs vgdb to use tcp/ip and listen for GDB on the specified port nr rather than to use
a pipe to communicate with GDB. Using tcp/ip allows to have GDB running on one computer and debugging a
Valgrind process running on another target computer. Example:
# On the target computer, start your program under valgrind using
valgrind --vgdb-error=0 prog
# and then in another shell, run:
vgdb --port=1234
On the computer which hosts GDB, execute the command:
gdb prog
(gdb) target remote targetip:1234
where targetip is the ip address or hostname of the target computer.
•
-c
To give more than one command to a standalone vgdb, separate the commands by an option
-c
. Example:
vgdb v.set log_output -c leak_check any
•
-l
instructs a standalone vgdb to report the list of the Valgrind gdbserver processes running and then exit.
•
-D
instructs a standalone vgdb to show the state of the shared memory used by the Valgrind gdbserver. vgdb will
exit after having shown the Valgrind gdbserver shared memory state.
•
-d
instructs vgdb to produce debugging output. Give multiple
-d
args to increase the verbosity. When giving
-d
to a relay vgdb, you better redirect the standard error (stderr) of vgdb to a file to avoid interaction between GDB
and vgdb debugging output.
3.2.10. Valgrind monitor commands
This section describes the Valgrind monitor commands, available regardless of the Valgrind tool selected. For the
tool specific commands, refer to
Memcheck Monitor Commands
,
Callgrind Monitor Commands
and
Massif Monitor
Commands
.
The monitor commands can be sent either from a shell command line, by using a standalone vgdb, or from GDB, by
using GDB’s "monitor" command (see
Monitor command handling by the Valgrind gdbserver
).
•
help [debug]
instructs Valgrind’s gdbserver to give the list of all monitor commands of the Valgrind core and
of the tool. The optional "debug" argument tells to also give help for the monitor commands aimed at Valgrind
internals debugging.
•
v.info all_errors
shows all errors found so far.
•
v.info last_error
shows the last error found.
•
v.info n_errs_found
shows the number of errors found so far, the nr of errors shown so far and the current
value of the
--vgdb-error
argument.
43
Содержание Software
Страница 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 ...