blob: ab267d34479edc779098ddf518e3aab410fa819e [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
6 v.info n_errs_found : show the nr of errors found so far
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]
sewardjc8bd1df2011-06-26 12:41:33 +000028 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000029 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000030 * = defaults
philippe2193a7c2012-12-08 17:54:16 +000031 where kind is one of definite indirect possible reachable all none
sewardj30b3eca2011-06-28 08:20:39 +000032 Examples: leak_check
33 leak_check summary any
philippe2193a7c2012-12-08 17:54:16 +000034 leak_check full kinds indirect,possible
philippe84234902012-01-14 13:53:13 +000035 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000036 block_list <loss_record_nr>
37 after a leak search, shows the list of blocks of <loss_record_nr>
38 who_points_at <addr> [<len>]
39 shows places pointing inside <len> (default 1) bytes at <addr>
40 (with len 1, only shows "start pointers" pointing exactly to <addr>,
41 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +000042
43general valgrind monitor commands:
philippec3360382012-10-21 14:37:14 +000044 help [debug] : monitor command help. With debug: + debugging commands
sewardj30b3eca2011-06-28 08:20:39 +000045 v.wait [<ms>] : sleep <ms> (default 0) then continue
46 v.info all_errors : show all errors found so far
47 v.info last_error : show last error found
48 v.info n_errs_found : show the nr of errors found so far
philippec3360382012-10-21 14:37:14 +000049 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +000050 v.kill : kill the Valgrind process
51 v.set gdb_output : set valgrind output to gdb
52 v.set log_output : set valgrind output to log
53 v.set mixed_output : set valgrind output to log, interactive output to gdb
philippe46207652013-01-20 17:11:58 +000054 v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames
sewardj30b3eca2011-06-28 08:20:39 +000055 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000056debugging valgrind internals monitor commands:
philippe6ec8d632013-01-23 22:10:28 +000057 v.do expensive_sanity_check_general : do an expensive sanity check now
sewardj30b3eca2011-06-28 08:20:39 +000058 v.info gdbserver_status : show gdbserver status
philippe93a6a8d2012-04-27 22:59:43 +000059 v.info memory [aspacemgr] : show valgrind heap memory stats
60 (with aspacemgr arg, also shows valgrind segments on log ouput)
philippe53bc8bc2013-01-10 22:35:33 +000061 v.info exectxt : show stacktraces and stats of all execontexts
sewardjd6e13d82011-10-22 20:23:30 +000062 v.info scheduler : show valgrind thread state and stacktrace
sewardj30b3eca2011-06-28 08:20:39 +000063 v.set debuglog <level> : set valgrind debug log level to <level>
64 v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
sewardj3b290482011-05-06 21:02:55 +000065 (default traceflags 0b00100000 : show after instrumentation)
66 An additional flag 0b100000000 allows to show gdbserver instrumentation
67
68memcheck monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000069 get_vbits <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000070 returns validity bits for <len> (or 1) bytes at <addr>
71 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
sewardj30b3eca2011-06-28 08:20:39 +000072 Example: get_vbits 0x........ 10
73 make_memory [noaccess|undefined
74 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000075 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000076 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000077 check that <len> (or 1) bytes at <addr> have the given accessibility
78 and outputs a description of <addr>
philippe2193a7c2012-12-08 17:54:16 +000079 leak_check [full*|summary]
80 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
sewardjc8bd1df2011-06-26 12:41:33 +000081 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000082 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000083 * = defaults
philippe2193a7c2012-12-08 17:54:16 +000084 where kind is one of definite indirect possible reachable all none
sewardj30b3eca2011-06-28 08:20:39 +000085 Examples: leak_check
86 leak_check summary any
philippe2193a7c2012-12-08 17:54:16 +000087 leak_check full kinds indirect,possible
philippe84234902012-01-14 13:53:13 +000088 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000089 block_list <loss_record_nr>
90 after a leak search, shows the list of blocks of <loss_record_nr>
91 who_points_at <addr> [<len>]
92 shows places pointing inside <len> (default 1) bytes at <addr>
93 (with len 1, only shows "start pointers" pointing exactly to <addr>,
94 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +000095
96monitor command request to kill this process