15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)general valgrind monitor commands: 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) help [debug] : monitor command help. With debug: + debugging commands 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.wait [<ms>] : sleep <ms> (default 0) then continue 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info all_errors : show all errors found so far 52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) v.info last_error : show last error found 62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) v.info location <addr> : show information about location <addr> 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info n_errs_found [msg] : show the nr of errors found so far and the given msg 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info open_fds : show open file descriptors (only if --track-fds=yes) 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.kill : kill the Valgrind process 108bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) v.set gdb_output : set valgrind output to gdb 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set log_output : set valgrind output to log 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set mixed_output : set valgrind output to log, interactive output to gdb 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set vgdb-error <errornr> : debug me at error >= <errornr> 15a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)memcheck monitor commands: 178bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) get_vbits <addr> [<len>] 188bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) returns validity bits for <len> (or 1) bytes at <addr> 198bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) bit values 0 = valid, 1 = invalid, __ = unaddressable byte 208bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) Example: get_vbits 0x........ 10 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) make_memory [noaccess|undefined 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) |defined|Definedifaddressable] <addr> [<len>] 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) mark <len> (or 1) bytes at <addr> with the given accessibility 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) check_memory [addressable|defined] <addr> [<len>] 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) check that <len> (or 1) bytes at <addr> have the given accessibility 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) and outputs a description of <addr> 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) leak_check [full*|summary] 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak] 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) [heuristics heur1,heur2,...] 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) [increased*|changed|any] 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) [unlimited*|limited <max_loss_records_output>] 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * = defaults 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) where kind is one of definite indirect possible reachable all none 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) where heur is one of stdstring newarray multipleinheritance all none* 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Examples: leak_check 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) leak_check summary any 378bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) leak_check full kinds indirect,possible 388bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) leak_check full reachable any limited 100 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) block_list <loss_record_nr> 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) after a leak search, shows the list of blocks of <loss_record_nr> 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) who_points_at <addr> [<len>] 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) shows places pointing inside <len> (default 1) bytes at <addr> 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) (with len 1, only shows "start pointers" pointing exactly to <addr>, 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) with len > 1, will also show "interior pointers") 455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)general valgrind monitor commands: 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) help [debug] : monitor command help. With debug: + debugging commands 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.wait [<ms>] : sleep <ms> (default 0) then continue 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info all_errors : show all errors found so far 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info last_error : show last error found 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info location <addr> : show information about location <addr> 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info n_errs_found [msg] : show the nr of errors found so far and the given msg 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info open_fds : show open file descriptors (only if --track-fds=yes) 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.kill : kill the Valgrind process 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set gdb_output : set valgrind output to gdb 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set log_output : set valgrind output to log 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set mixed_output : set valgrind output to log, interactive output to gdb 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set merge-recursive-frames <num> : merge recursive calls in max <num> frames 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set vgdb-error <errornr> : debug me at error >= <errornr> 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)debugging valgrind internals monitor commands: 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.do expensive_sanity_check_general : do an expensive sanity check now 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info gdbserver_status : show gdbserver status 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info memory [aspacemgr] : show valgrind heap memory stats 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) (with aspacemgr arg, also shows valgrind segments on log ouput) 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info exectxt : show stacktraces and stats of all execontexts 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info scheduler : show valgrind thread state and stacktrace 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.info stats : show various valgrind and tool stats 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set debuglog <level> : set valgrind debug log level to <level> 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.set hostvisibility [yes*|no] : (en/dis)ables access by gdb/gdbserver to 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Valgrind internal host status/memory 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags> 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) (default traceflags 0b00100000 : show after instrumentation) 735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) An additional flag 0b100000000 allows to show gdbserver instrumentation 745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)memcheck monitor commands: 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) get_vbits <addr> [<len>] 778bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) returns validity bits for <len> (or 1) bytes at <addr> 788bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) bit values 0 = valid, 1 = invalid, __ = unaddressable byte 795f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) Example: get_vbits 0x........ 10 805f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) make_memory [noaccess|undefined 81cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) |defined|Definedifaddressable] <addr> [<len>] 825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) mark <len> (or 1) bytes at <addr> with the given accessibility 835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) check_memory [addressable|defined] <addr> [<len>] 845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) check that <len> (or 1) bytes at <addr> have the given accessibility 855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) and outputs a description of <addr> 865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) leak_check [full*|summary] 875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak] 885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) [heuristics heur1,heur2,...] 892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) [increased*|changed|any] 90 [unlimited*|limited <max_loss_records_output>] 91 * = defaults 92 where kind is one of definite indirect possible reachable all none 93 where heur is one of stdstring newarray multipleinheritance all none* 94 Examples: leak_check 95 leak_check summary any 96 leak_check full kinds indirect,possible 97 leak_check full reachable any limited 100 98 block_list <loss_record_nr> 99 after a leak search, shows the list of blocks of <loss_record_nr> 100 who_points_at <addr> [<len>] 101 shows places pointing inside <len> (default 1) bytes at <addr> 102 (with len 1, only shows "start pointers" pointing exactly to <addr>, 103 with len > 1, will also show "interior pointers") 104 105monitor command request to kill this process 106