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

4. Complete one of the following steps to preload librtc.[sl|so]:
Use the +rtc option for the chatr command on each of the required
executable files that must be instrumented, as follows:
$ chatr +rtc enable exec1 exec2 exec3
The +rtc <enable> option for the chatr command is available for dynamic
linker versions B.11.66 and later on HP 9000 systems, and dynamic linker
versions B.12.51 and later on Integrity systems.
(Or)
Preload librtc.[sl|so] for all the executables, as follows:
For 32-bit applications running on Itanium,
LD_PRELOAD=/opt/langtools/lib/hpux32/librtc.so exec1 exec2 exec3
For 64-bit applications running on Itanium,
LD_PRELOAD=/opt/langtools/lib/hpux64/librtc.so exec1 exec2 exec3
For 32-bit applications running on PA-RISC,
LD_PRELOAD=/opt/langtools/lib/librtc.sl exec1 exec2 exec3
For 64-bit applications running on PA-RISC,
LD_PRELOAD=/opt/langtools/lib/pa20_64/librtc.sl exec1 exec2 exec3
NOTE: If exec1 eventually spawns exec2, exec3, exec4, and exec5, only
exec1, exec2 and exec3 are debugged based on the settings in the rtcconfig
file.
Debugging in Attach Mode
WDB can attach to a running process and debug memory problems. However to use
the debugger in this mode, the application must be launched after preloading the
librtc.[sl|so] runtime library.
To debug memory on attaching GDB to a running process, complete the following steps:
Supported Modes of Memory-debugging in WDB 73