Debugging with GDB (February 2008)

Table Of Contents
Chapter 14: HP-UX Configuration-Specific Information 143
14.10.5.3 Example for Batch Mode RTC
This section illustrates examples of batch mode RTC on HP 9000 and Integrity Systems.
Example for Batch Mode RTC of a PA-RISC 32 bit Executable
Step 1: Compile the source files.
Step 2: The rtcconfig file must entries, such as the following:
check_heap=on
check_leaks=on
check_free=on
files=executable_name
output_dir=/tmp/results
Step 3: Set the following environment variables as follows:
export BATCH_RTC=on
Step 4: Complete one of the following steps:
- Map the shared libraries privately using chatr, as follows:
chatr +dbg enable <executable>
Explicitly preload the librtc runtime library and start the target applica-
tion, as follows:
LD_PRELOAD=/opt/langtools/lib//librtc.sl <executable>
<arguments>
(Or)
- Set the target application to preload librtc by using the +mem_check
option for the chatr command. In addition to automatically loading the
librtc library, the +mem_check option for the chatr command also maps
the shared libraries as private.
To set the target application to preload the librtc runtime library, enter
the following command at the HP-UX prompt:
$ chatr +mem_check enable <executable>
Example for Batch Mode RTC on Integrity Systems: Example-1
Step 1: Compile the source files.
Step 2: The rtcconfig file must contain entries such as the following:
check_heap=on
check_leaks=on
check_free=on
files=executable_name
output_dir=/tmp/results
Step 3: Set the following environment variables as follows:
export BATCH_RTC=on
Step 4: Complete one of the following steps: