sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 1 | general valgrind monitor commands: |
philippe | c336038 | 2012-10-21 14:37:14 +0000 | [diff] [blame] | 2 | help [debug] : monitor command help. With debug: + debugging commands |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 3 | 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 |
philippe | 02ea413 | 2013-09-04 21:42:43 +0000 | [diff] [blame^] | 6 | v.info n_errs_found [msg] : show the nr of errors found so far and the given msg |
philippe | c336038 | 2012-10-21 14:37:14 +0000 | [diff] [blame] | 7 | v.info open_fds : show open file descriptors (only if --track-fds=yes) |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 8 | 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 |
philippe | 4620765 | 2013-01-20 17:11:58 +0000 | [diff] [blame] | 12 | v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 13 | v.set vgdb-error <errornr> : debug me at error >= <errornr> |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 14 | |
| 15 | memcheck monitor commands: |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 16 | get_vbits <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 17 | returns validity bits for <len> (or 1) bytes at <addr> |
| 18 | bit values 0 = valid, 1 = invalid, __ = unaddressable byte |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 19 | Example: get_vbits 0x........ 10 |
| 20 | make_memory [noaccess|undefined |
| 21 | |defined|Definedifaddressable] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 22 | mark <len> (or 1) bytes at <addr> with the given accessibility |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 23 | check_memory [addressable|defined] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 24 | check that <len> (or 1) bytes at <addr> have the given accessibility |
| 25 | and outputs a description of <addr> |
philippe | 2193a7c | 2012-12-08 17:54:16 +0000 | [diff] [blame] | 26 | leak_check [full*|summary] |
| 27 | [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak] |
sewardj | c8bd1df | 2011-06-26 12:41:33 +0000 | [diff] [blame] | 28 | [increased*|changed|any] |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 29 | [unlimited*|limited <max_loss_records_output>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 30 | * = defaults |
philippe | 2193a7c | 2012-12-08 17:54:16 +0000 | [diff] [blame] | 31 | where kind is one of definite indirect possible reachable all none |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 32 | Examples: leak_check |
| 33 | leak_check summary any |
philippe | 2193a7c | 2012-12-08 17:54:16 +0000 | [diff] [blame] | 34 | leak_check full kinds indirect,possible |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 35 | leak_check full reachable any limited 100 |
philippe | a22f59d | 2012-01-26 23:13:52 +0000 | [diff] [blame] | 36 | 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") |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 42 | |
| 43 | general valgrind monitor commands: |
philippe | c336038 | 2012-10-21 14:37:14 +0000 | [diff] [blame] | 44 | help [debug] : monitor command help. With debug: + debugging commands |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 45 | 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 |
philippe | 02ea413 | 2013-09-04 21:42:43 +0000 | [diff] [blame^] | 48 | v.info n_errs_found [msg] : show the nr of errors found so far and the given msg |
philippe | c336038 | 2012-10-21 14:37:14 +0000 | [diff] [blame] | 49 | v.info open_fds : show open file descriptors (only if --track-fds=yes) |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 50 | 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 |
philippe | 4620765 | 2013-01-20 17:11:58 +0000 | [diff] [blame] | 54 | v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 55 | v.set vgdb-error <errornr> : debug me at error >= <errornr> |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 56 | debugging valgrind internals monitor commands: |
philippe | 6ec8d63 | 2013-01-23 22:10:28 +0000 | [diff] [blame] | 57 | v.do expensive_sanity_check_general : do an expensive sanity check now |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 58 | v.info gdbserver_status : show gdbserver status |
philippe | 93a6a8d | 2012-04-27 22:59:43 +0000 | [diff] [blame] | 59 | v.info memory [aspacemgr] : show valgrind heap memory stats |
| 60 | (with aspacemgr arg, also shows valgrind segments on log ouput) |
philippe | 53bc8bc | 2013-01-10 22:35:33 +0000 | [diff] [blame] | 61 | v.info exectxt : show stacktraces and stats of all execontexts |
sewardj | d6e13d8 | 2011-10-22 20:23:30 +0000 | [diff] [blame] | 62 | v.info scheduler : show valgrind thread state and stacktrace |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 63 | v.set debuglog <level> : set valgrind debug log level to <level> |
| 64 | v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags> |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 65 | (default traceflags 0b00100000 : show after instrumentation) |
| 66 | An additional flag 0b100000000 allows to show gdbserver instrumentation |
| 67 | |
| 68 | memcheck monitor commands: |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 69 | get_vbits <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 70 | returns validity bits for <len> (or 1) bytes at <addr> |
| 71 | bit values 0 = valid, 1 = invalid, __ = unaddressable byte |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 72 | Example: get_vbits 0x........ 10 |
| 73 | make_memory [noaccess|undefined |
| 74 | |defined|Definedifaddressable] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 75 | mark <len> (or 1) bytes at <addr> with the given accessibility |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 76 | check_memory [addressable|defined] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 77 | check that <len> (or 1) bytes at <addr> have the given accessibility |
| 78 | and outputs a description of <addr> |
philippe | 2193a7c | 2012-12-08 17:54:16 +0000 | [diff] [blame] | 79 | leak_check [full*|summary] |
| 80 | [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak] |
sewardj | c8bd1df | 2011-06-26 12:41:33 +0000 | [diff] [blame] | 81 | [increased*|changed|any] |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 82 | [unlimited*|limited <max_loss_records_output>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 83 | * = defaults |
philippe | 2193a7c | 2012-12-08 17:54:16 +0000 | [diff] [blame] | 84 | where kind is one of definite indirect possible reachable all none |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 85 | Examples: leak_check |
| 86 | leak_check summary any |
philippe | 2193a7c | 2012-12-08 17:54:16 +0000 | [diff] [blame] | 87 | leak_check full kinds indirect,possible |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 88 | leak_check full reachable any limited 100 |
philippe | a22f59d | 2012-01-26 23:13:52 +0000 | [diff] [blame] | 89 | 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") |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 95 | |
| 96 | monitor command request to kill this process |