1 general valgrind
monitor commands
:
2 help
[debug
] : monitor command help. With debug
: + debugging commands
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 location
<addr
> : show information about location
<addr
>
7 v.
info n_errs_found
[msg
] : show the nr of errors found so far and the given msg
8 v.
info open_fds
: show open file descriptors
(only
if --track
-fds
=yes
)
9 v.kill
: kill the Valgrind process
10 v.clo
<clo_option
>...
: changes one or more dynamic command line options
11 with no clo_option
, show the dynamically changeable options.
12 v.
set gdb_output
: set valgrind output to gdb
13 v.
set log_output
: set valgrind output to
log
14 v.
set mixed_output
: set valgrind output to
log, interactive output to gdb
15 v.
set merge
-recursive-frames
<num
> : merge
recursive calls in
max <num
> frames
16 v.
set vgdb
-error
<errornr
> : debug me at error
>= <errornr
>
17 memcheck
monitor commands
:
19 prints validity bits
for <len
> (or
1) bytes at
<addr
>
20 bit
values 0 = valid
, 1 = invalid
, __
= unaddressable byte
21 Then prints the bytes
values below the corresponding validity bits
22 in a layout similar to the gdb command
'x /<len>xb <addr>'
23 Example
: xb
0x........
10
24 get_vbits
<addr
> [<len
>]
25 Similar to xb
, but only prints the validity bytes by group of
4.
26 make_memory
[noaccess|undefined
27 |defined|Definedifaddressable
] <addr
> [<len
>]
28 mark
<len
> (or
1) bytes at
<addr
> with the given accessibility
29 check_memory
[addressable|defined
] <addr
> [<len
>]
30 check that
<len
> (or
1) bytes at
<addr
> have the given accessibility
31 and outputs a description of
<addr
>
32 leak_check
[full
*|summary|xtleak
]
33 [kinds kind1
,kind2
,...|reachable|possibleleak
*|definiteleak
]
34 [heuristics heur1
,heur2
,...
]
35 [increased
*|changed|
any]
36 [unlimited
*|limited
<max_loss_records_output
>]
38 xtleak produces an xtree full leak result in xtleak.kcg.
%p.
%n
40 definite indirect possible reachable all
none
42 stdstring length64 newarray multipleinheritance all
none*
44 leak_check summary
any
45 leak_check full kinds indirect
,possible
46 leak_check full reachable
any limited
100
47 block_list
<loss_record_nr
>|
<loss_record_nr_from
>..
<loss_record_nr_to
>
48 [unlimited
*|limited
<max_blocks
>]
49 [heuristics heur1
,heur2
,...
]
50 after a leak search
, shows the list of blocks of
<loss_record_nr
>
51 (or of the range
<loss_record_nr_from
>..
<loss_record_nr_to
>).
52 With heuristics
, only shows the blocks found via heur1
,heur2
,...
54 who_points_at
<addr
> [<len
>]
55 shows places pointing inside
<len
> (default
1) bytes at
<addr
>
56 (with len
1, only shows
"start pointers" pointing exactly to <addr>,
57 with len
> 1, will also
show "interior pointers")
59 dump xtree memory profile in
<filename
> (default xtmemory.kcg.
%p.
%n
)
60 general valgrind
monitor commands
:
61 help
[debug
] : monitor command help. With debug
: + debugging commands
62 v.wait
[<ms
>] : sleep <ms
> (default
0) then continue
63 v.
info all_errors
: show all errors found so far
64 v.
info last_error
: show last error found
65 v.
info location
<addr
> : show information about location
<addr
>
66 v.
info n_errs_found
[msg
] : show the nr of errors found so far and the given msg
67 v.
info open_fds
: show open file descriptors
(only
if --track
-fds
=yes
)
68 v.kill
: kill the Valgrind process
69 v.clo
<clo_option
>...
: changes one or more dynamic command line options
70 with no clo_option
, show the dynamically changeable options.
71 v.
set gdb_output
: set valgrind output to gdb
72 v.
set log_output
: set valgrind output to
log
73 v.
set mixed_output
: set valgrind output to
log, interactive output to gdb
74 v.
set merge
-recursive-frames
<num
> : merge
recursive calls in
max <num
> frames
75 v.
set vgdb
-error
<errornr
> : debug me at error
>= <errornr
>
76 debugging valgrind internals
monitor commands
:
77 v.
do expensive_sanity_check_general
: do an expensive sanity check now
78 v.
info gdbserver_status
: show gdbserver
status
79 v.
info memory
[aspacemgr
] : show valgrind heap memory stats
80 (with aspacemgr
arg, also shows valgrind segments
on log output
)
81 v.
info exectxt
: show stacktraces and stats of all execontexts
82 v.
info scheduler
: show valgrind thread state and stacktrace
83 v.
info stats
: show various valgrind and tool stats
84 v.
info unwind
<addr
> [<len
>] : show unwind debug
info for <addr
> ..
<addr
+len
>
85 v.
set debuglog
<level
> : set valgrind debug
log level to
<level
>
86 v.
set hostvisibility
[yes
*|no
] : (en
/dis
)ables access by gdb
/gdbserver to
87 Valgrind internal host
status/memory
88 v.
translate <addr
> [<traceflags
>] : debug translation of
<addr
> with
<traceflags
>
89 (default traceflags
0b00100000
: show after instrumentation
)
90 An additional flag
0b100000000 allows to
show gdbserver instrumentation
91 memcheck
monitor commands
:
93 prints validity bits
for <len
> (or
1) bytes at
<addr
>
94 bit
values 0 = valid
, 1 = invalid
, __
= unaddressable byte
95 Then prints the bytes
values below the corresponding validity bits
96 in a layout similar to the gdb command
'x /<len>xb <addr>'
97 Example
: xb
0x........
10
98 get_vbits
<addr
> [<len
>]
99 Similar to xb
, but only prints the validity bytes by group of
4.
100 make_memory
[noaccess|undefined
101 |defined|Definedifaddressable
] <addr
> [<len
>]
102 mark
<len
> (or
1) bytes at
<addr
> with the given accessibility
103 check_memory
[addressable|defined
] <addr
> [<len
>]
104 check that
<len
> (or
1) bytes at
<addr
> have the given accessibility
105 and outputs a description of
<addr
>
106 leak_check
[full
*|summary|xtleak
]
107 [kinds kind1
,kind2
,...|reachable|possibleleak
*|definiteleak
]
108 [heuristics heur1
,heur2
,...
]
109 [increased
*|changed|
any]
110 [unlimited
*|limited
<max_loss_records_output
>]
112 xtleak produces an xtree full leak result in xtleak.kcg.
%p.
%n
113 where kind is one of
:
114 definite indirect possible reachable all
none
115 where heur is one of
:
116 stdstring length64 newarray multipleinheritance all
none*
118 leak_check summary
any
119 leak_check full kinds indirect
,possible
120 leak_check full reachable
any limited
100
121 block_list
<loss_record_nr
>|
<loss_record_nr_from
>..
<loss_record_nr_to
>
122 [unlimited
*|limited
<max_blocks
>]
123 [heuristics heur1
,heur2
,...
]
124 after a leak search
, shows the list of blocks of
<loss_record_nr
>
125 (or of the range
<loss_record_nr_from
>..
<loss_record_nr_to
>).
126 With heuristics
, only shows the blocks found via heur1
,heur2
,...
128 who_points_at
<addr
> [<len
>]
129 shows places pointing inside
<len
> (default
1) bytes at
<addr
>
130 (with len
1, only shows
"start pointers" pointing exactly to <addr>,
131 with len
> 1, will also
show "interior pointers")
132 xtmemory
[<filename
>]
133 dump xtree memory profile in
<filename
> (default xtmemory.kcg.
%p.
%n
)
134 monitor command request to kill this process