Debugging with GDB (February 2008)

Table Of Contents
142 Debugging with GDB
14.10.5.2 Environment variable setting for Batch mode debugging
Batch mode memory leak detection uses the following environment variables:
GDBRTC_CONFIG species the location of rtc configuration file. If this option is not
specified, the configuration file is assumed to be in the current location, and has the
filename rtcconfig. If user prefers to set this option, it must include the filename.
Incorrect usage:
export GDBRTC_CONFIG=./
export GDBRTC_CONFIG=/tmp
Correct usage:
export GDBRTC_CONFIG=/tmp/yet_another_config
export GDBRTC_CONFIG=/tmp/rtcconfig
BATCH_RTC enables or disables batch memory leak detection.
GDB_SERVER is used to override the default path from where the gdb executable is used
to provide the information on memory leak. By default, /opt/langtools/bin/gdb is
used to print the output. This can be overriden by setting GDB_SERVER appropriately.
RTC_MALLOC_CONFIG is used to override the default config and rtcconfig file settings.
This variable can be set as follows:
export RTC_MALLOC_CONFIG=config_string1[;config_strings].
The config_strings are separated by ;.
The following config strings options exist for RTC_MALLOC_CONFIG:
abort_on_bounds=[01]
Aborts execution when heap objects bounds check fail, value is 1,
and the environment variable RTC_NO_ABORT is not set.
abort_on_bad_free=[01]
Aborts execution when free or realloc is trying to free a heap
object which is not valid, value is 1, and environment variable
RTC_NO_ABORT is not set.
abort_on_nomem=[01]
Aborts execution when out of memory if value is 1, and environ-
ment variable RTC_NO_ABORT is not set.
leak_logfile=stderr[+]filename
The log file for batch mode must be specified.
stderr: error message goes to stderr
[+]filename: error message goes to filename, + means output is
appended to the file.
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.