Debugging with GDB (September 2007)
Chapter 14: HP-UX Configuration-Specific Information 149
Memory Debugging Commands in Interactive and Batch Mode
Command Description Interactive mode Batch mode
Toggles heap profiling and
detection of leaks, bounds,
and double free
set heap-check [on |
off]
check_heap= [on | off] (or) set
heap-check [on | off]
Toggle the leak detection
capability
set heap-check leaks
[on |off]
check_leaks =[on | off] (or)
set heap-check leaks [on
|off]
Toggle validation of calls to
strcpy, strncpy, memcpy,
memccpy, memset, memmove,
bzero and, bcopy
set heap-check string
[on | off]
check_string= [on |off] (or)
set heap-check string [on |
off]
Toggle validation of calls to
free()
set heap-check free
[on |off]
check_free = [on |off] (or)
set heap-check free [on |
off]
Specify whether freed
blocks should b e scrambled
set heap-check
scramble [on |off]
scramble_blocks=[on| off](or)
set heap-check scramble [on
|off]
Toggle bounds check on
heap blocks
set heap-check bounds
[on| off]
check_bounds = [on | off] (or)
set heap-check bounds [on|
off]
Specify the minimum size
of a block for stack trace
collection. GDB will report
blocks of size greater than
or equal to <num> at each
call-site.
set heap-check
min-heap-size <num>
min_heap_size = <num> (or)
set heap-check min-heap-size
<num>