Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)

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.
Debugging Memory Interactively After Attaching to a Running Process
HP WDB accepts -pid or -p followed 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:
Debugging Memory Problems 123