blob: 765def38481da2308bb766e1e7c2bc589180988a [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
philippe02ea4132013-09-04 21:42:43 +00006 v.info n_errs_found [msg] : show the nr of errors found so far and the given msg
philippec3360382012-10-21 14:37:14 +00007 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +00008 v.kill : kill the Valgrind process
9 v.set gdb_output : set valgrind output to gdb
10 v.set log_output : set valgrind output to log
11 v.set mixed_output : set valgrind output to log, interactive output to gdb
philippe46207652013-01-20 17:11:58 +000012 v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames
sewardj30b3eca2011-06-28 08:20:39 +000013 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000014
15memcheck 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
philippe278b2a32013-10-09 20:12:39 +000032 where kind is one of definite indirect possible reachable all none
33 where heur is one of stdstring newarray multipleinheritance all none*
sewardj30b3eca2011-06-28 08:20:39 +000034 Examples: leak_check
35 leak_check summary any
philippe2193a7c2012-12-08 17:54:16 +000036 leak_check full kinds indirect,possible
philippe84234902012-01-14 13:53:13 +000037 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000038 block_list <loss_record_nr>
39 after a leak search, shows the list of blocks of <loss_record_nr>
40 who_points_at <addr> [<len>]
41 shows places pointing inside <len> (default 1) bytes at <addr>
42 (with len 1, only shows "start pointers" pointing exactly to <addr>,
43 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +000044
45general valgrind monitor commands:
philippec3360382012-10-21 14:37:14 +000046 help [debug] : monitor command help. With debug: + debugging commands
sewardj30b3eca2011-06-28 08:20:39 +000047 v.wait [<ms>] : sleep <ms> (default 0) then continue
48 v.info all_errors : show all errors found so far
49 v.info last_error : show last error found
philippe02ea4132013-09-04 21:42:43 +000050 v.info n_errs_found [msg] : show the nr of errors found so far and the given msg
philippec3360382012-10-21 14:37:14 +000051 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +000052 v.kill : kill the Valgrind process
53 v.set gdb_output : set valgrind output to gdb
54 v.set log_output : set valgrind output to log
55 v.set mixed_output : set valgrind output to log, interactive output to gdb
philippe46207652013-01-20 17:11:58 +000056 v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames
sewardj30b3eca2011-06-28 08:20:39 +000057 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000058debugging valgrind internals monitor commands:
philippe6ec8d632013-01-23 22:10:28 +000059 v.do expensive_sanity_check_general : do an expensive sanity check now
sewardj30b3eca2011-06-28 08:20:39 +000060 v.info gdbserver_status : show gdbserver status
philippe93a6a8d2012-04-27 22:59:43 +000061 v.info memory [aspacemgr] : show valgrind heap memory stats
62 (with aspacemgr arg, also shows valgrind segments on log ouput)
philippe53bc8bc2013-01-10 22:35:33 +000063 v.info exectxt : show stacktraces and stats of all execontexts
sewardjd6e13d82011-10-22 20:23:30 +000064 v.info scheduler : show valgrind thread state and stacktrace
philippe8587b542013-12-15 20:24:43 +000065 v.info stats : show various valgrind and tool stats
sewardj30b3eca2011-06-28 08:20:39 +000066 v.set debuglog <level> : set valgrind debug log level to <level>
philippe180a7502014-04-20 13:41:10 +000067 v.set hostvisibility [yes*|no] : (en/dis)ables access by gdb/gdbserver to
68 Valgrind internal host status/memory
sewardj30b3eca2011-06-28 08:20:39 +000069 v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
sewardj3b290482011-05-06 21:02:55 +000070 (default traceflags 0b00100000 : show after instrumentation)
71 An additional flag 0b100000000 allows to show gdbserver instrumentation
72
73memcheck monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000074 get_vbits <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000075 returns validity bits for <len> (or 1) bytes at <addr>
76 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
sewardj30b3eca2011-06-28 08:20:39 +000077 Example: get_vbits 0x........ 10
78 make_memory [noaccess|undefined
79 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000080 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000081 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000082 check that <len> (or 1) bytes at <addr> have the given accessibility
83 and outputs a description of <addr>
philippe2193a7c2012-12-08 17:54:16 +000084 leak_check [full*|summary]
85 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
philippeab1fce92013-09-29 13:47:32 +000086 [heuristics heur1,heur2,...]
sewardjc8bd1df2011-06-26 12:41:33 +000087 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000088 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000089 * = defaults
philippe278b2a32013-10-09 20:12:39 +000090 where kind is one of definite indirect possible reachable all none
91 where heur is one of stdstring newarray multipleinheritance all none*
sewardj30b3eca2011-06-28 08:20:39 +000092 Examples: leak_check
93 leak_check summary any
philippe2193a7c2012-12-08 17:54:16 +000094 leak_check full kinds indirect,possible
philippe84234902012-01-14 13:53:13 +000095 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000096 block_list <loss_record_nr>
97 after a leak search, shows the list of blocks of <loss_record_nr>
98 who_points_at <addr> [<len>]
99 shows places pointing inside <len> (default 1) bytes at <addr>
100 (with len 1, only shows "start pointers" pointing exactly to <addr>,
101 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +0000102
103monitor command request to kill this process