Debugging with GDB (February 2008)

Table Of Contents
Chapter 14: HP-UX Configuration-Specific Information 149
WDB tries to help as much as possible to detect if these pointers are of type datum or
real pointers. In a -g compiled binary, WDB performs a look-up on a symbol table to
find the symbol name and type to find the symbol name of the potential pointer and if
its of pointer type, then the corresponding dangling block is really dangling(not a false
positive).
WDB turns on these checks, only when you specify set heap-check retain-freed-
blocks on.
14.10.8.6 Detect in-block corruption of freed blocks
HP WDB detects all the attempts of a program to write to the freed dangling blocks
using dangling pointers.We detect such in-block corruptions and are reported as part
of the existing info corruption command output.
14.10.8.7 Specify the amount of guard bytes for every block of
allocated memory
HP WDB enables you to programmatically control the size of guard bytes for every
block of the allocated memory. You can use these guard bytes to spot very rare and
non-trivial boundary (buffer over-run and buffer under-run) corruptions. This again
is available optionally when the user specifies set heap-check retain-freed-blocks
<on>.
14.10.9 Comparison of Memory Debugging Commands in
Interactive Mode and Batch Mode
HP WDB 5.6 and later versions provide consistency in format for the batch mode
options and the interactive mode commands.
The following table lists the memory debugging commands available in batch and
interactive mode: