blob: d3c61a1c86d634ffb5ec38516aa17e273f75fffa [file] [log] [blame]
sewardj3b290482011-05-06 21:02:55 +00001general valgrind monitor commands:
philippec3360382012-10-21 14:37:14 +00002 help [debug] : monitor command help. With debug: + debugging commands
sewardj30b3eca2011-06-28 08:20:39 +00003 v.wait [<ms>] : sleep <ms> (default 0) then continue
4 v.info all_errors : show all errors found so far
5 v.info last_error : show last error found
philippe07c08522014-05-14 20:39:27 +00006 v.info location <addr> : show information about location <addr>
philippe02ea4132013-09-04 21:42:43 +00007 v.info n_errs_found [msg] : show the nr of errors found so far and the given msg
philippec3360382012-10-21 14:37:14 +00008 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +00009 v.kill : kill the Valgrind process
10 v.set gdb_output : set valgrind output to gdb
11 v.set log_output : set valgrind output to log
12 v.set mixed_output : set valgrind output to log, interactive output to gdb
philippe46207652013-01-20 17:11:58 +000013 v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames
sewardj30b3eca2011-06-28 08:20:39 +000014 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000015memcheck monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000016 get_vbits <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000017 returns validity bits for <len> (or 1) bytes at <addr>
18 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
sewardj30b3eca2011-06-28 08:20:39 +000019 Example: get_vbits 0x........ 10
20 make_memory [noaccess|undefined
21 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000022 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000023 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000024 check that <len> (or 1) bytes at <addr> have the given accessibility
25 and outputs a description of <addr>
philippe2193a7c2012-12-08 17:54:16 +000026 leak_check [full*|summary]
27 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
philippeab1fce92013-09-29 13:47:32 +000028 [heuristics heur1,heur2,...]
sewardjc8bd1df2011-06-26 12:41:33 +000029 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000030 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000031 * = defaults
sewardj122f6af2014-09-03 21:58:54 +000032 where kind is one of:
33 definite indirect possible reachable all none
34 where heur is one of:
35 stdstring length64 newarray multipleinheritance all none*
36 Examples: leak_check
37 leak_check summary any
38 leak_check full kinds indirect,possible
39 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000040 block_list <loss_record_nr>
41 after a leak search, shows the list of blocks of <loss_record_nr>
42 who_points_at <addr> [<len>]
43 shows places pointing inside <len> (default 1) bytes at <addr>
44 (with len 1, only shows "start pointers" pointing exactly to <addr>,
45 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +000046general valgrind monitor commands:
philippec3360382012-10-21 14:37:14 +000047 help [debug] : monitor command help. With debug: + debugging commands
sewardj30b3eca2011-06-28 08:20:39 +000048 v.wait [<ms>] : sleep <ms> (default 0) then continue
49 v.info all_errors : show all errors found so far
50 v.info last_error : show last error found
philippe07c08522014-05-14 20:39:27 +000051 v.info location <addr> : show information about location <addr>
philippe02ea4132013-09-04 21:42:43 +000052 v.info n_errs_found [msg] : show the nr of errors found so far and the given msg
philippec3360382012-10-21 14:37:14 +000053 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +000054 v.kill : kill the Valgrind process
55 v.set gdb_output : set valgrind output to gdb
56 v.set log_output : set valgrind output to log
57 v.set mixed_output : set valgrind output to log, interactive output to gdb
philippe46207652013-01-20 17:11:58 +000058 v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames
sewardj30b3eca2011-06-28 08:20:39 +000059 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000060debugging valgrind internals monitor commands:
philippe6ec8d632013-01-23 22:10:28 +000061 v.do expensive_sanity_check_general : do an expensive sanity check now
sewardj30b3eca2011-06-28 08:20:39 +000062 v.info gdbserver_status : show gdbserver status
philippe93a6a8d2012-04-27 22:59:43 +000063 v.info memory [aspacemgr] : show valgrind heap memory stats
64 (with aspacemgr arg, also shows valgrind segments on log ouput)
philippe53bc8bc2013-01-10 22:35:33 +000065 v.info exectxt : show stacktraces and stats of all execontexts
sewardjd6e13d82011-10-22 20:23:30 +000066 v.info scheduler : show valgrind thread state and stacktrace
philippe8587b542013-12-15 20:24:43 +000067 v.info stats : show various valgrind and tool stats
sewardj30b3eca2011-06-28 08:20:39 +000068 v.set debuglog <level> : set valgrind debug log level to <level>
philippe180a7502014-04-20 13:41:10 +000069 v.set hostvisibility [yes*|no] : (en/dis)ables access by gdb/gdbserver to
70 Valgrind internal host status/memory
sewardj30b3eca2011-06-28 08:20:39 +000071 v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
sewardj3b290482011-05-06 21:02:55 +000072 (default traceflags 0b00100000 : show after instrumentation)
73 An additional flag 0b100000000 allows to show gdbserver instrumentation
sewardj3b290482011-05-06 21:02:55 +000074memcheck monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000075 get_vbits <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000076 returns validity bits for <len> (or 1) bytes at <addr>
77 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
sewardj30b3eca2011-06-28 08:20:39 +000078 Example: get_vbits 0x........ 10
79 make_memory [noaccess|undefined
80 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000081 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000082 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000083 check that <len> (or 1) bytes at <addr> have the given accessibility
84 and outputs a description of <addr>
philippe2193a7c2012-12-08 17:54:16 +000085 leak_check [full*|summary]
86 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
philippeab1fce92013-09-29 13:47:32 +000087 [heuristics heur1,heur2,...]
sewardjc8bd1df2011-06-26 12:41:33 +000088 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000089 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000090 * = defaults
sewardj122f6af2014-09-03 21:58:54 +000091 where kind is one of:
92 definite indirect possible reachable all none
93 where heur is one of:
94 stdstring length64 newarray multipleinheritance all none*
95 Examples: leak_check
96 leak_check summary any
97 leak_check full kinds indirect,possible
98 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000099 block_list <loss_record_nr>
100 after a leak search, shows the list of blocks of <loss_record_nr>
101 who_points_at <addr> [<len>]
102 shows places pointing inside <len> (default 1) bytes at <addr>
103 (with len 1, only shows "start pointers" pointing exactly to <addr>,
104 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +0000105monitor command request to kill this process