memory checking. The librtc.so library is shipped as part of the wdb product. Install the HP WDB bundled with the compiler or a more recent version of wdb to get full functionality.
The default behavior of the +check=malloc option can be changed by users providing their own rtcconfig file. The user specified rtcconfig file can be in the current directory OR in a directory specified by the GDBRTC_CONFIG environment variable. The default configuration used by the
+check=malloc option is:
check_bounds=1; check_free=1; scramble_block=1;
abort_on_bounds=1; abort_on_bad_free=1; abort_on_nomem=1; check_leaks=1; min_leak_size=0; check_heap=0; frame_count=4; output_dir=.;
Note that when +check=bounds:pointer is also turned on, it can check freed memory read/write. But the check needs to retain freed memory which is not turned on by default. To turn on the feature, set the following environment variable at runtime:
RTC_MALLOC_CONFIG="retain_freed_blocks=1"
Or add "retain_freed_blocks=1" to the rtcconfig file.
When malloc fails to allocate specified memory, the runtime system will free the retained freed memory and try to allocate memory.
For a description for the above configuration parameters and the full list of other parameters, refer to the HP WDB debugger documentation.
Execution Path Recovery
This feature is enabled by the +pathtrace[=localglobalglobal_fixed_sizenone] Option. It provides a mechanism to record program execution control flow into global and/or local path tables. The saved information can be used by the HP WDB debugger to assist with crash path recovery from the core file, or to assist in debugging the program by showing the executed branches.
Currently only
+pathtrace=local
This option generates a local path table and records basic
+pathtrace=global
This option generates a global path table and records basic
+pathtrace=global_fixed_size
This option generates a
14