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.
set gdb_output
: set valgrind output to gdb
11 v.
set log_output
: set valgrind output to
log
12 v.
set mixed_output
: set valgrind output to
log, interactive output to gdb
13 v.
set merge
-recursive-frames
<num
> : merge
recursive calls in
max <num
> frames
14 v.
set vgdb
-error
<errornr
> : debug me at error
>= <errornr
>
15 memcheck
monitor commands
:
16 get_vbits
<addr
> [<len
>]
17 returns validity bits
for <len
> (or
1) bytes at
<addr
>
18 bit
values 0 = valid
, 1 = invalid
, __
= unaddressable byte
19 Example
: get_vbits
0x........
10
20 make_memory
[noaccess|undefined
21 |defined|Definedifaddressable
] <addr
> [<len
>]
22 mark
<len
> (or
1) bytes at
<addr
> with the given accessibility
23 check_memory
[addressable|defined
] <addr
> [<len
>]
24 check that
<len
> (or
1) bytes at
<addr
> have the given accessibility
25 and outputs a description of
<addr
>
26 leak_check
[full
*|summary
]
27 [kinds kind1
,kind2
,...|reachable|possibleleak
*|definiteleak
]
28 [heuristics heur1
,heur2
,...
]
29 [increased
*|changed|
any]
30 [unlimited
*|limited
<max_loss_records_output
>]
33 definite indirect possible reachable all
none
35 stdstring length64 newarray multipleinheritance all
none*
37 leak_check summary
any
38 leak_check full kinds indirect
,possible
39 leak_check full reachable
any limited
100
40 block_list
<loss_record_nr
>
41 after a leak search
, shows the list of blocks of
<loss_record_nr
>
42 who_points_at
<addr
> [<len
>]
43 shows places pointing inside
<len
> (default
1) bytes at
<addr
>
44 (with len
1, only shows
"start pointers" pointing exactly to <addr>,
45 with len
> 1, will also
show "interior pointers")
46 general valgrind
monitor commands
:
47 help
[debug
] : monitor command help. With debug
: + debugging commands
48 v.wait
[<ms
>] : sleep <ms
> (default
0) then continue
49 v.
info all_errors
: show all errors found so far
50 v.
info last_error
: show last error found
51 v.
info location
<addr
> : show information about location
<addr
>
52 v.
info n_errs_found
[msg
] : show the nr of errors found so far and the given msg
53 v.
info open_fds
: show open file descriptors
(only
if --track
-fds
=yes
)
54 v.kill
: kill the Valgrind process
55 v.
set gdb_output
: set valgrind output to gdb
56 v.
set log_output
: set valgrind output to
log
57 v.
set mixed_output
: set valgrind output to
log, interactive output to gdb
58 v.
set merge
-recursive-frames
<num
> : merge
recursive calls in
max <num
> frames
59 v.
set vgdb
-error
<errornr
> : debug me at error
>= <errornr
>
60 debugging valgrind internals
monitor commands
:
61 v.
do expensive_sanity_check_general
: do an expensive sanity check now
62 v.
info gdbserver_status
: show gdbserver
status
63 v.
info memory
[aspacemgr
] : show valgrind heap memory stats
64 (with aspacemgr
arg, also shows valgrind segments
on log ouput
)
65 v.
info exectxt
: show stacktraces and stats of all execontexts
66 v.
info scheduler
: show valgrind thread state and stacktrace
67 v.
info stats
: show various valgrind and tool stats
68 v.
info unwind
<addr
> [<len
>] : show unwind debug
info for <addr
> ..
<addr
+len
>
69 v.
set debuglog
<level
> : set valgrind debug
log level to
<level
>
70 v.
set hostvisibility
[yes
*|no
] : (en
/dis
)ables access by gdb
/gdbserver to
71 Valgrind internal host
status/memory
72 v.
translate <addr
> [<traceflags
>] : debug translation of
<addr
> with
<traceflags
>
73 (default traceflags
0b00100000
: show after instrumentation
)
74 An additional flag
0b100000000 allows to
show gdbserver instrumentation
75 memcheck
monitor commands
:
76 get_vbits
<addr
> [<len
>]
77 returns validity bits
for <len
> (or
1) bytes at
<addr
>
78 bit
values 0 = valid
, 1 = invalid
, __
= unaddressable byte
79 Example
: get_vbits
0x........
10
80 make_memory
[noaccess|undefined
81 |defined|Definedifaddressable
] <addr
> [<len
>]
82 mark
<len
> (or
1) bytes at
<addr
> with the given accessibility
83 check_memory
[addressable|defined
] <addr
> [<len
>]
84 check that
<len
> (or
1) bytes at
<addr
> have the given accessibility
85 and outputs a description of
<addr
>
86 leak_check
[full
*|summary
]
87 [kinds kind1
,kind2
,...|reachable|possibleleak
*|definiteleak
]
88 [heuristics heur1
,heur2
,...
]
89 [increased
*|changed|
any]
90 [unlimited
*|limited
<max_loss_records_output
>]
93 definite indirect possible reachable all
none
95 stdstring length64 newarray multipleinheritance all
none*
97 leak_check summary
any
98 leak_check full kinds indirect
,possible
99 leak_check full reachable
any limited
100
100 block_list
<loss_record_nr
>
101 after a leak search
, shows the list of blocks of
<loss_record_nr
>
102 who_points_at
<addr
> [<len
>]
103 shows places pointing inside
<len
> (default
1) bytes at
<addr
>
104 (with len
1, only shows
"start pointers" pointing exactly to <addr>,
105 with len
> 1, will also
show "interior pointers")
106 monitor command request to kill this process