sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 1 | general valgrind monitor commands: |
| 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 |
| 6 | v.info n_errs_found : show the nr of errors found so far |
| 7 | v.kill : kill the Valgrind process |
| 8 | v.set gdb_output : set valgrind output to gdb |
| 9 | v.set log_output : set valgrind output to log |
| 10 | v.set mixed_output : set valgrind output to log, interactive output to gdb |
| 11 | v.set vgdb-error <errornr> : debug me at error >= <errornr> |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 12 | |
| 13 | memcheck monitor commands: |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 14 | get_vbits <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 15 | returns validity bits for <len> (or 1) bytes at <addr> |
| 16 | bit values 0 = valid, 1 = invalid, __ = unaddressable byte |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 17 | Example: get_vbits 0x........ 10 |
| 18 | make_memory [noaccess|undefined |
| 19 | |defined|Definedifaddressable] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 20 | mark <len> (or 1) bytes at <addr> with the given accessibility |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 21 | check_memory [addressable|defined] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 22 | check that <len> (or 1) bytes at <addr> have the given accessibility |
| 23 | and outputs a description of <addr> |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 24 | leak_check [full*|summary] [reachable|possibleleak*|definiteleak] |
sewardj | c8bd1df | 2011-06-26 12:41:33 +0000 | [diff] [blame] | 25 | [increased*|changed|any] |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 26 | [unlimited*|limited <max_loss_records_output>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 27 | * = defaults |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 28 | Examples: leak_check |
| 29 | leak_check summary any |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 30 | leak_check full reachable any limited 100 |
philippe | a22f59d | 2012-01-26 23:13:52 +0000 | [diff] [blame^] | 31 | block_list <loss_record_nr> |
| 32 | after a leak search, shows the list of blocks of <loss_record_nr> |
| 33 | who_points_at <addr> [<len>] |
| 34 | shows places pointing inside <len> (default 1) bytes at <addr> |
| 35 | (with len 1, only shows "start pointers" pointing exactly to <addr>, |
| 36 | with len > 1, will also show "interior pointers") |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 37 | |
| 38 | general valgrind monitor commands: |
| 39 | help [debug] : monitor command help. With debug: + debugging commands |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 40 | v.wait [<ms>] : sleep <ms> (default 0) then continue |
| 41 | v.info all_errors : show all errors found so far |
| 42 | v.info last_error : show last error found |
| 43 | v.info n_errs_found : show the nr of errors found so far |
| 44 | v.kill : kill the Valgrind process |
| 45 | v.set gdb_output : set valgrind output to gdb |
| 46 | v.set log_output : set valgrind output to log |
| 47 | v.set mixed_output : set valgrind output to log, interactive output to gdb |
| 48 | v.set vgdb-error <errornr> : debug me at error >= <errornr> |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 49 | debugging valgrind internals monitor commands: |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 50 | v.info gdbserver_status : show gdbserver status |
| 51 | v.info memory : show valgrind heap memory stats |
sewardj | d6e13d8 | 2011-10-22 20:23:30 +0000 | [diff] [blame] | 52 | v.info scheduler : show valgrind thread state and stacktrace |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 53 | v.set debuglog <level> : set valgrind debug log level to <level> |
| 54 | v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags> |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 55 | (default traceflags 0b00100000 : show after instrumentation) |
| 56 | An additional flag 0b100000000 allows to show gdbserver instrumentation |
| 57 | |
| 58 | memcheck monitor commands: |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 59 | get_vbits <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 60 | returns validity bits for <len> (or 1) bytes at <addr> |
| 61 | bit values 0 = valid, 1 = invalid, __ = unaddressable byte |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 62 | Example: get_vbits 0x........ 10 |
| 63 | make_memory [noaccess|undefined |
| 64 | |defined|Definedifaddressable] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 65 | mark <len> (or 1) bytes at <addr> with the given accessibility |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 66 | check_memory [addressable|defined] <addr> [<len>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 67 | check that <len> (or 1) bytes at <addr> have the given accessibility |
| 68 | and outputs a description of <addr> |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 69 | leak_check [full*|summary] [reachable|possibleleak*|definiteleak] |
sewardj | c8bd1df | 2011-06-26 12:41:33 +0000 | [diff] [blame] | 70 | [increased*|changed|any] |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 71 | [unlimited*|limited <max_loss_records_output>] |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 72 | * = defaults |
sewardj | 30b3eca | 2011-06-28 08:20:39 +0000 | [diff] [blame] | 73 | Examples: leak_check |
| 74 | leak_check summary any |
philippe | 8423490 | 2012-01-14 13:53:13 +0000 | [diff] [blame] | 75 | leak_check full reachable any limited 100 |
philippe | a22f59d | 2012-01-26 23:13:52 +0000 | [diff] [blame^] | 76 | block_list <loss_record_nr> |
| 77 | after a leak search, shows the list of blocks of <loss_record_nr> |
| 78 | who_points_at <addr> [<len>] |
| 79 | shows places pointing inside <len> (default 1) bytes at <addr> |
| 80 | (with len 1, only shows "start pointers" pointing exactly to <addr>, |
| 81 | with len > 1, will also show "interior pointers") |
sewardj | 3b29048 | 2011-05-06 21:02:55 +0000 | [diff] [blame] | 82 | |
| 83 | monitor command request to kill this process |