HP gnu source-level debugger 5992-4701 User Manual
Page 177

Table 14-1 Memory Debugging Commands in Interactive and Batch Mode
Batch mode
Interactive mode
Command Description
check_heap= [on | off]
(or)
set heap-check [on | off]
set heap-check [on
| off]
Toggles heap profiling and detection
of leaks, bounds, and double free
check_leaks =[on | off]
(or)
set heap-check leaks [on
|off]
set heap-check leaks [on
|off]
Toggle the leak detection capability
check_string= [on |off]
(or)
set heap-check string [on |
off]
set heap-check
string [on | off]
Toggle validation of calls to strcpy,
strncpy
, memcpy, memccpy,
memset
, memmove, bzero, and
bcopy
check_free = [on |off]
(or)
set heap-check free [on |
off]
set heap-check free
[on |off]
Toggle validation of calls to free()
scramble_blocks=[on| off]
(or)
set heap-check scramble [on
|off]
set heap-check
scramble [on |off]
Specify whether freed blocks should
be scrambled
check_bounds = [on | off]
(or) set heap-check bounds
[on| off]
set heap-check
bounds [on| off]
Toggle bounds check on heap blocks
min_heap_size =
(or) set
heap-check min-heap-size
set heap-check
min-heap-size
Specify the minimum size of a block
for stack trace collection. GDB will
report blocks of size greater than or
equal to
min_leak_size =
(or) set
heap-check min-leak-size
set heap-check
min-leak-size
Specify the minimum size of a block
for stack trace collection. GDB report
leaks of blocks, smaller than this
value. However, no stack trace is
provided.
frame_count =
(or) set
heap-check frame-count
set heap-check
frame-count
Specify the depth of call stack to be
captured
Not supported in batch mode
set heap-check watch
address
Instruct GDB to stop, whenever a
block at the given address gets
allocated or deallocated.
Not supported in batch mode
set heap-check
null-check
Instructs malloc to return null after
invocations of malloc.
Not supported in batch mode
set heap-check
null-check-size
Instructs malloc to return null after
bytes have been allocated by
malloc
.
Not supported in batch mode
set heap-check
seed-value
Specifies the seed value to be used
for generating random
null-check-count.
14.10 Debugging Memory Problems
177