Debugging Dynamic Memory Usage Errors Using HP WDB (5900-1474; WDB 6.2; January 2011)
configuration file by exporting the environment variable GDBRTC_CONFIG to contain
the pathname of the configuration file (including the filename.)
The following example illustrates how to specify the path of the configuration file:
$ export GDBRTC_CONFIG=/tmp/rtcconfig
If the path to the configuration file is not specified, the debugger assumes that the
rtcconfig configuration file, by default, is located in the current working directory.
Supported Variables for Memory-Debugging in the Batch Mode Configuration File
You must specify the variables in the configuration file based on the commands that are
required to debug the application. Table 14 lists the variables that are supported in the
configuration file.
Table 14 Supported Variables in the Batch Mode Configuration File
DescriptionCommand
Enables you to detect double-frees and frees with
improper arguments
set heap-check free <on/off>
Enables heap profilingset heap-check <on/off>
Enables you to detect leaksset heap-check leaks <on/off>
Enables validation of calls to strcpy(),
strncpy(), memcpy(), memccpy(),memset(),
memmove(), bzero(), and, bcopy()
set heap-check string <on/off>
Enables you to check for out-of-bounds corruption
when the block is freed
set heap-check bounds <on/off>
Enables you to specify the executables for which
memory leak detection is enabled. If the files option
is not specified (after setting BATCH_RTC=on) , the
debugger checks all the executables.
files=<file1:file2:..fileN>
Enables you to set the number of frames to be
collected for leak or heap profiles
set heap-check frame-count <num>
Enables you to set the minimum block size to use for
heap reporting
set heap-check min-heap-size <num>
Enables you to set the minimum block size to use for
leak reporting
set heap-check min-block-size <num>
Enables you to specify the name of the output data
directory
output_dir= <output_data_dir_path>
Enables you to scramble the blocksset heap-check scramble <on/off>
64