Debugging Dynamic Memory Usage Errors Using HP WDB (5900-1474; WDB 6.2; January 2011)

NOTE: On Itanium systems, librtc versions prior to 6.1, the Batch Mode RTC displays
one of the following errors and causes the program to temporarily hang if the version of
GDB and librtc.[sl|so] do not match, or if GDB is not available on the system:
/opt/langtools/bin/gdb: unrecognized option -brtc Use /opt/langtools/bin/gdb --help for a complete
list of options.
(OR)
execl failed. Cannot print RTC info: No such file or directory
This error does not occur under normal usage where GDB or librtc.[sl|so] is used
from the default location at /opt/langtools/.... However, this error occurs if
GDB_SERVER ,LIBRTC_SERVER, or both are set to a mismatched version of GDB or
librtc.[sl|so] respectively.
Enabling the Processing of the .gdbinit File
Processing of the .gdbinit file is not enabled in batch mode from librtc 6.1 version
and later. On Itanium system for librtc versions prior to 6.1, RTC_PROCESS_GDBINIT
is an optional environment variable used to enable processing of the .gdbinit file.
You can use the .gdbinit file to specify path settings such as dir, objectdir, and
pathmap to set the path of the source and object files in case the source or object paths
are different than the current directory, so that the generated RTC reports display the
symbol names and line numbers correctly. This feature is optionally enabled only when
the RTC_PROCESS_GDBINIT environment variable is set to 1. There are limitations on
what commands in the .gdbinit file. If there are erroneous commands in the .gdbinit
file, the batch RTC session can possibly hang and not produce the expected RTC reports.
Following are some examples:
1. If the 'q' (quit) command is used, the session would hang and finally terminate after
approximately 10 mins, and not generate any RTC reports. It would print the error
message "Broken synchronization between child/parent process".
2. If any gdb command that would take more processing time is used, this would
interfere with the assumptions of RTC and the session may hang and print the error
message "Broken synchronization between child/parent process".
Configuration File for Batch Mode Debugging
You can set your preferences for batch mode memory-debugging by setting the parameters
in the configuration file. The following sections discuss the location of the configuration
file and the supported variables.
Location of the Configuration File for Batch Mode Debugging
The configuration file rtcconfig for batch mode debugging is user-defined. You must
either create the rtcconfig file in the current directory or specify the location of the
Supported Modes of Memory-debugging in WDB 63