mem_logfile=stderr[+]filename heap_logfile=stderr[+]filename

Specify config_strings for +check=malloc on Itanium or WDB memory check batch mode on Integrity systems.

RTC_PROCESS_GDBINIT is an optional environment variable used to enable processing of the .gdbinit file. You can use the .gdbinit file to specify path settings such as dir, objectdir, and pathmap to set the path of the source and object files in case the source or object paths are different than the current directory, so that the generated RTC reports display the symbol names and line numbers correctly. This feature is optionally enabled only when the RTC_PROCESS_GDBINIT environment variable is set to 1.

There are limitations on what commands in the .gdbinit file. If there are erroneous commands in the .gdbinit file, the batch RTC session can possibly hang and not produce the expected RTC reports. Following are some examples:

1.If the 'q' (quit) command is used, the session would hang and finally terminate after approximately 10 mins, and not generate any RTC reports. It would print the error message "Broken synchronization between child/parent process".

2.If any gdb command that would take more processing time is used, this would interfere with the assumptions of RTC and the session may hang and print the error message "Broken synchronization between child/parent process".

14.10.5.3Example 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

1.Compile the source files.

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

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

14.10 Debugging Memory Problems 169