blob: 9fd12caef5246bd094e5be397e8ca81478085c8c [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:
philippeb92e6322015-08-04 19:11:03 +000016 xb <addr> [<len>]
17 prints validity bits for <len> (or 1) bytes at <addr>
sewardj3b290482011-05-06 21:02:55 +000018 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
philippeb92e6322015-08-04 19:11:03 +000019 Then prints the bytes values below the corresponding validity bits
20 in a layout similar to the gdb command 'x /<len>xb <addr>'
21 Example: xb 0x........ 10
22 get_vbits <addr> [<len>]
23 Similar to xb, but only prints the validity bytes by group of 4.
sewardj30b3eca2011-06-28 08:20:39 +000024 make_memory [noaccess|undefined
25 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000026 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000027 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000028 check that <len> (or 1) bytes at <addr> have the given accessibility
29 and outputs a description of <addr>
Elliott Hughesed398002017-06-21 14:41:24 -070030 leak_check [full*|summary|xtleak]
philippe2193a7c2012-12-08 17:54:16 +000031 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
philippeab1fce92013-09-29 13:47:32 +000032 [heuristics heur1,heur2,...]
sewardjc8bd1df2011-06-26 12:41:33 +000033 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000034 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000035 * = defaults
Elliott Hughesed398002017-06-21 14:41:24 -070036 xtleak produces an xtree full leak result in xtleak.kcg.%p.%n
sewardj122f6af2014-09-03 21:58:54 +000037 where kind is one of:
38 definite indirect possible reachable all none
39 where heur is one of:
40 stdstring length64 newarray multipleinheritance all none*
41 Examples: leak_check
42 leak_check summary any
43 leak_check full kinds indirect,possible
44 leak_check full reachable any limited 100
philippece3b04c2015-09-02 21:26:34 +000045 block_list <loss_record_nr>|<loss_record_nr_from>..<loss_record_nr_to>
46 [unlimited*|limited <max_blocks>]
47 [heuristics heur1,heur2,...]
philippea22f59d2012-01-26 23:13:52 +000048 after a leak search, shows the list of blocks of <loss_record_nr>
philippece3b04c2015-09-02 21:26:34 +000049 (or of the range <loss_record_nr_from>..<loss_record_nr_to>).
50 With heuristics, only shows the blocks found via heur1,heur2,...
philippe6d3cb492015-08-13 22:49:32 +000051 * = defaults
philippea22f59d2012-01-26 23:13:52 +000052 who_points_at <addr> [<len>]
53 shows places pointing inside <len> (default 1) bytes at <addr>
54 (with len 1, only shows "start pointers" pointing exactly to <addr>,
55 with len > 1, will also show "interior pointers")
Elliott Hughesed398002017-06-21 14:41:24 -070056 xtmemory [<filename>]
57 dump xtree memory profile in <filename> (default xtmemory.kcg.%p.%n)
sewardj3b290482011-05-06 21:02:55 +000058general valgrind monitor commands:
philippec3360382012-10-21 14:37:14 +000059 help [debug] : monitor command help. With debug: + debugging commands
sewardj30b3eca2011-06-28 08:20:39 +000060 v.wait [<ms>] : sleep <ms> (default 0) then continue
61 v.info all_errors : show all errors found so far
62 v.info last_error : show last error found
philippe07c08522014-05-14 20:39:27 +000063 v.info location <addr> : show information about location <addr>
philippe02ea4132013-09-04 21:42:43 +000064 v.info n_errs_found [msg] : show the nr of errors found so far and the given msg
philippec3360382012-10-21 14:37:14 +000065 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +000066 v.kill : kill the Valgrind process
67 v.set gdb_output : set valgrind output to gdb
68 v.set log_output : set valgrind output to log
69 v.set mixed_output : set valgrind output to log, interactive output to gdb
philippe46207652013-01-20 17:11:58 +000070 v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames
sewardj30b3eca2011-06-28 08:20:39 +000071 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000072debugging valgrind internals monitor commands:
philippe6ec8d632013-01-23 22:10:28 +000073 v.do expensive_sanity_check_general : do an expensive sanity check now
sewardj30b3eca2011-06-28 08:20:39 +000074 v.info gdbserver_status : show gdbserver status
philippe93a6a8d2012-04-27 22:59:43 +000075 v.info memory [aspacemgr] : show valgrind heap memory stats
rhyskidd05c9d212015-07-06 09:34:12 +000076 (with aspacemgr arg, also shows valgrind segments on log output)
philippe53bc8bc2013-01-10 22:35:33 +000077 v.info exectxt : show stacktraces and stats of all execontexts
sewardjd6e13d82011-10-22 20:23:30 +000078 v.info scheduler : show valgrind thread state and stacktrace
philippe8587b542013-12-15 20:24:43 +000079 v.info stats : show various valgrind and tool stats
philippe97bfa192015-06-02 22:09:42 +000080 v.info unwind <addr> [<len>] : show unwind debug info for <addr> .. <addr+len>
sewardj30b3eca2011-06-28 08:20:39 +000081 v.set debuglog <level> : set valgrind debug log level to <level>
philippe180a7502014-04-20 13:41:10 +000082 v.set hostvisibility [yes*|no] : (en/dis)ables access by gdb/gdbserver to
83 Valgrind internal host status/memory
sewardj30b3eca2011-06-28 08:20:39 +000084 v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
sewardj3b290482011-05-06 21:02:55 +000085 (default traceflags 0b00100000 : show after instrumentation)
86 An additional flag 0b100000000 allows to show gdbserver instrumentation
sewardj3b290482011-05-06 21:02:55 +000087memcheck monitor commands:
philippeb92e6322015-08-04 19:11:03 +000088 xb <addr> [<len>]
89 prints validity bits for <len> (or 1) bytes at <addr>
sewardj3b290482011-05-06 21:02:55 +000090 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
philippeb92e6322015-08-04 19:11:03 +000091 Then prints the bytes values below the corresponding validity bits
92 in a layout similar to the gdb command 'x /<len>xb <addr>'
93 Example: xb 0x........ 10
94 get_vbits <addr> [<len>]
95 Similar to xb, but only prints the validity bytes by group of 4.
sewardj30b3eca2011-06-28 08:20:39 +000096 make_memory [noaccess|undefined
97 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000098 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000099 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +0000100 check that <len> (or 1) bytes at <addr> have the given accessibility
101 and outputs a description of <addr>
Elliott Hughesed398002017-06-21 14:41:24 -0700102 leak_check [full*|summary|xtleak]
philippe2193a7c2012-12-08 17:54:16 +0000103 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
philippeab1fce92013-09-29 13:47:32 +0000104 [heuristics heur1,heur2,...]
sewardjc8bd1df2011-06-26 12:41:33 +0000105 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +0000106 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +0000107 * = defaults
Elliott Hughesed398002017-06-21 14:41:24 -0700108 xtleak produces an xtree full leak result in xtleak.kcg.%p.%n
sewardj122f6af2014-09-03 21:58:54 +0000109 where kind is one of:
110 definite indirect possible reachable all none
111 where heur is one of:
112 stdstring length64 newarray multipleinheritance all none*
113 Examples: leak_check
114 leak_check summary any
115 leak_check full kinds indirect,possible
116 leak_check full reachable any limited 100
philippece3b04c2015-09-02 21:26:34 +0000117 block_list <loss_record_nr>|<loss_record_nr_from>..<loss_record_nr_to>
118 [unlimited*|limited <max_blocks>]
119 [heuristics heur1,heur2,...]
philippea22f59d2012-01-26 23:13:52 +0000120 after a leak search, shows the list of blocks of <loss_record_nr>
philippece3b04c2015-09-02 21:26:34 +0000121 (or of the range <loss_record_nr_from>..<loss_record_nr_to>).
122 With heuristics, only shows the blocks found via heur1,heur2,...
philippe6d3cb492015-08-13 22:49:32 +0000123 * = defaults
philippea22f59d2012-01-26 23:13:52 +0000124 who_points_at <addr> [<len>]
125 shows places pointing inside <len> (default 1) bytes at <addr>
126 (with len 1, only shows "start pointers" pointing exactly to <addr>,
127 with len > 1, will also show "interior pointers")
Elliott Hughesed398002017-06-21 14:41:24 -0700128 xtmemory [<filename>]
129 dump xtree memory profile in <filename> (default xtmemory.kcg.%p.%n)
sewardj3b290482011-05-06 21:02:55 +0000130monitor command request to kill this process