HP WDB 5.7 Release Notes

Automatic Preloading of librtc.[sl|so] with the New +mem_check Option for the chatr Command
The new +mem_check option for the chatr command enables you to automatically preload the
librtc.[sl|so] runtime library. In addition to automatically preloading the librtc.[sl|so]
library, it also maps the shared library as private. This enhancement simplifies the current method
of explicitly preloading the appropriate librtc.[sl|so] library, by using the LD_PRELOAD
environment variable.
The +mem_check <enable|disable> option 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.
To set the target application to preload librtc.[sl|so], enter the following command at the
HP-UX prompt:
$ chatr +mem_check enable <executable>
The +mem_check option for the chatr simplifies the steps for batch mode and attach mode
memory debugging.
Simplified Steps for Batch Mode RTC Using the +mem_check Option for the chatr Command
To use batch mode memory leak detection, complete the following steps:
1. Compile the source files.
2. Create an rtcconfig file in the current directory with the required batch mode commands.
3. Define the environment variable BATCH_RTC at the HP-UX prompt, as follows:
export BATCH_RTC=on
4. To set the target application to preload librtc.[sl|so], enter the following command
at the HP-UX prompt:
$ chatr +mem_check enable <executable>
At the end of the run, output data file is created in output_data_dir (if defined in
rtcconfig), or the current directory.
Simplified Steps for Debugging Memory in the Attach Mode by Using the +mem_check Option
for the chatr Command
To debug memory after attaching GDB to a running process, complete the following steps:
1. To set the target application to preload the librtc.[sl|so] runtime library, enter the
following command at the HP-UX prompt:
$ chatr +mem_check enable <executable>
2. Run the program.
3. Start the debugging session, as follows:
gdb -leaks <executable-name> <process-id>
What Is New in This Version 11