blob: e118ef55e06572d67a52a930e79799f5e292493b [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
12 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000013
14memcheck monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000015 get_vbits <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000016 returns validity bits for <len> (or 1) bytes at <addr>
17 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
sewardj30b3eca2011-06-28 08:20:39 +000018 Example: get_vbits 0x........ 10
19 make_memory [noaccess|undefined
20 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000021 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000022 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000023 check that <len> (or 1) bytes at <addr> have the given accessibility
24 and outputs a description of <addr>
philippe2193a7c2012-12-08 17:54:16 +000025 leak_check [full*|summary]
26 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
sewardjc8bd1df2011-06-26 12:41:33 +000027 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000028 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000029 * = defaults
philippe2193a7c2012-12-08 17:54:16 +000030 where kind is one of definite indirect possible reachable all none
sewardj30b3eca2011-06-28 08:20:39 +000031 Examples: leak_check
32 leak_check summary any
philippe2193a7c2012-12-08 17:54:16 +000033 leak_check full kinds indirect,possible
philippe84234902012-01-14 13:53:13 +000034 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000035 block_list <loss_record_nr>
36 after a leak search, shows the list of blocks of <loss_record_nr>
37 who_points_at <addr> [<len>]
38 shows places pointing inside <len> (default 1) bytes at <addr>
39 (with len 1, only shows "start pointers" pointing exactly to <addr>,
40 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +000041
42general valgrind monitor commands:
philippec3360382012-10-21 14:37:14 +000043 help [debug] : monitor command help. With debug: + debugging commands
sewardj30b3eca2011-06-28 08:20:39 +000044 v.wait [<ms>] : sleep <ms> (default 0) then continue
45 v.info all_errors : show all errors found so far
46 v.info last_error : show last error found
47 v.info n_errs_found : show the nr of errors found so far
philippec3360382012-10-21 14:37:14 +000048 v.info open_fds : show open file descriptors (only if --track-fds=yes)
sewardj30b3eca2011-06-28 08:20:39 +000049 v.kill : kill the Valgrind process
50 v.set gdb_output : set valgrind output to gdb
51 v.set log_output : set valgrind output to log
52 v.set mixed_output : set valgrind output to log, interactive output to gdb
53 v.set vgdb-error <errornr> : debug me at error >= <errornr>
sewardj3b290482011-05-06 21:02:55 +000054debugging valgrind internals monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000055 v.info gdbserver_status : show gdbserver status
philippe93a6a8d2012-04-27 22:59:43 +000056 v.info memory [aspacemgr] : show valgrind heap memory stats
57 (with aspacemgr arg, also shows valgrind segments on log ouput)
philippe53bc8bc2013-01-10 22:35:33 +000058 v.info exectxt : show stacktraces and stats of all execontexts
sewardjd6e13d82011-10-22 20:23:30 +000059 v.info scheduler : show valgrind thread state and stacktrace
sewardj30b3eca2011-06-28 08:20:39 +000060 v.set debuglog <level> : set valgrind debug log level to <level>
61 v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
sewardj3b290482011-05-06 21:02:55 +000062 (default traceflags 0b00100000 : show after instrumentation)
63 An additional flag 0b100000000 allows to show gdbserver instrumentation
64
65memcheck monitor commands:
sewardj30b3eca2011-06-28 08:20:39 +000066 get_vbits <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000067 returns validity bits for <len> (or 1) bytes at <addr>
68 bit values 0 = valid, 1 = invalid, __ = unaddressable byte
sewardj30b3eca2011-06-28 08:20:39 +000069 Example: get_vbits 0x........ 10
70 make_memory [noaccess|undefined
71 |defined|Definedifaddressable] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000072 mark <len> (or 1) bytes at <addr> with the given accessibility
sewardj30b3eca2011-06-28 08:20:39 +000073 check_memory [addressable|defined] <addr> [<len>]
sewardj3b290482011-05-06 21:02:55 +000074 check that <len> (or 1) bytes at <addr> have the given accessibility
75 and outputs a description of <addr>
philippe2193a7c2012-12-08 17:54:16 +000076 leak_check [full*|summary]
77 [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
sewardjc8bd1df2011-06-26 12:41:33 +000078 [increased*|changed|any]
philippe84234902012-01-14 13:53:13 +000079 [unlimited*|limited <max_loss_records_output>]
sewardj3b290482011-05-06 21:02:55 +000080 * = defaults
philippe2193a7c2012-12-08 17:54:16 +000081 where kind is one of definite indirect possible reachable all none
sewardj30b3eca2011-06-28 08:20:39 +000082 Examples: leak_check
83 leak_check summary any
philippe2193a7c2012-12-08 17:54:16 +000084 leak_check full kinds indirect,possible
philippe84234902012-01-14 13:53:13 +000085 leak_check full reachable any limited 100
philippea22f59d2012-01-26 23:13:52 +000086 block_list <loss_record_nr>
87 after a leak search, shows the list of blocks of <loss_record_nr>
88 who_points_at <addr> [<len>]
89 shows places pointing inside <len> (default 1) bytes at <addr>
90 (with len 1, only shows "start pointers" pointing exactly to <addr>,
91 with len > 1, will also show "interior pointers")
sewardj3b290482011-05-06 21:02:55 +000092
93monitor command request to kill this process