2.The rtcconfig file should contain entries such as the following:

check_heap=on check_leaks=on check_free=on files=exec1:exec2:exec3 output_dir=/tmp/results

3.Set the following environment variables as follows: export BATCH_RTC=on

4.Complete one of the following steps:

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

OR

Preload the librtc library as follows:

export LD_PRELOAD /opt/langtools/lib/hpux32/librtc.so

5.Run the program as follows:

./exec1

Suppose exec1 eventually spawns exec2, exec3, exec4, exec5, only exec1, exec2, exec3 will be instrumented based on the settings in the rtcconfig file.

14.10.6Debugging Memory Interactively After Attaching to a Running Process

HP WDB accepts -pidor -pfollowed by a process ID to attach a running process to the debugger.

To use Batch RTC after attaching GDB to a running process, complete the following steps:

14.10 Debugging Memory Problems 171