Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)
scramble_blocks=on|off (or)
set heap-check scramble
<on/off>
Enables block scrambling.
Batch mode leak detection stops the application at the end, when libraries are being unloaded,
and invokes HP WDB to print the leak or heap data.
NOTE: It is incorrect usage to use spaces before or after the '=' symbol in the batch mode
configuration options in the configuration file, rtcconfig. Additionally, it is incorrect usage to
use spaces before the batch mode configuration options.
For example:
Correct Usage:
$ cat rtcconfig
check_leaks=on
check_heap=on
files=batchrtc4
$
Incorrect Usage:
$ cat rtcconfig
check_leaks=on
check_heap = on
files=batchrtc4
$
Steps for Batch Mode Memory Debugging
To use batch memory debugging, complete the following steps:
1. Compile the source files.
2. Create an rtcconfig file in the current directory.
3. Set an environment variable BATCH_RTC. If you are using the Korn or Posix shell, enter the
following command at the HP-UX prompt:
export BATCH_RTC=on
4. Complete one of the following steps to preload the librtc runtime library:
• Set the target application to preload librtc by using the +rtc option for the chatr
command. In addition to automatically loading the librtc library, the +rtc option for
the chatr command also maps the shared libraries as private. To enable or disable the
target application to preload the librtc runtime library, enter the following command at
the HP-UX prompt:
$ chatr +rtc <enable|disable> <executable>
NOTE: The chatr +rtc option preloads the librtc runtime library from the following
default paths:
– 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
126 HP-UX Configuration-Specific Information