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

Pre-loading the Appropriate Version of librtc.[sl|so] Along With the Application
The appropriate version of the librtc.[sl|so] runtime library must be preloaded to
enable batch mode and attach mode memory debugging of an application.
You can explicitly preload librtc.[sl|so] from the appropriate path by using the
LD_PRELOAD environment variable.
Alternately you can use the +rtc <enable|disable> option for the chatr command
to automatically preload librtc.[sl|so]. Both of these methods are illustrated in this
section.
NOTE: The +mem_check <enable> option for the chatr command is available for
dynamic linker versions B.11.61 and later on HP 9000 systems, and dynamic linker
versions B.12.46 and later on Integrity systems.
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. However, +mem_check option is retained with the latest
Linker version.
Using chatr +rtc to Automatically Preload librtc.[sl|so]
To automatically preload librtc.[sl|so] by using the +rtc <enable|disable>
for the chatr command, enter the following command at the HP-UX prompt:
$ chatr +rtc <enable> <executable>
In addition to automatically loading librtc.[sl|so], the +rtc option for the chatr
command also maps the shared libraries as private. The +rtc option preloads
librtc.[sl|so] from the following default paths for librtc.[sl|so] :
- For 32 bit IPF applications
/opt/langtools/lib/hpux32/librtc.so
For 64 bit IPF applications,
/opt/langtools/lib/hpux64/librtc.so
For 32 bit PA applications,
opt/langtools/lib/librtc.sl
For 64-bit PA applications,
/opt/langtools/lib/pa20_64/librtc.sl
Supported Modes of Memory-debugging in WDB 61