Debugging a Program With dbx

dbxenv Variables

The following dbxenv variables control the operation of RTC. If you want to permanently change any of these variables from their default values, place the dbxenv commands in the $HOME/.dbxrc file.Then, your preferred values are used whenever you use RTC.

dbxenv rtc_auto_continue {on | off}

rtc_auto_continue on causes RTC not to stop upon finding an error, but to continue running. It also causes all errors to be redirected to the rtc_error_log_file_name.The default is off.

dbxenv rtc_auto_suppress {on | off}

rtc_auto_suppress on causes a particular access error at a particular location to be reported only the first time it is encountered and suppressed thereafter. This is useful, for example, for preventing multiple copies of the same error report when an error occurs in a loop that is executed many times. The default is on.

dbxenv rtc_biu_at_exit {on | off | verbose}

This variable is used when memory use checking is on. If the value of the variable is on, a non-verbose memory use (blocks in use) report is produced at program exit. The default is on.

If the value is verbose, a verbose memory use report is produced at program exit. The value off causes no output. This variable has no effect on the showmemuse command.

dbxenv rtc_error_log_file_name filename

rtc_error_log_file_name redirects RTC error messages to the designated file instead of to the standard output of dbx. The default is /tmp/dbx.errlog.uniqueid.

The program does not automatically stop when run time errors are detected in batch mode. All error output is directed to your rtc_error_log_file_name file. The program stops when breakpoints are encountered or if the program is interrupted.

In batch mode, the complete stack backtrace is generated and redirected to the rtc_error_log_file_name file. To redirect all errors to the terminal, set the rtc_error_log_file_name to /dev/tty.

dbxenv rtc_error_limit n

n is the maximum number of errors that RTC reports. The error limit is used separately for access errors and leak errors. For example, if the error limit is set to 5, then a maximum of five access errors and five memory leaks are shown in both the leak report at the end of the run and for each showleaks command you issue. The default is 1000.

dbxenv rtc_mel_at_exit {on | off | verbose}

This variable is used when leak checking is on. If the value of the variable is on, a non-verbose memory leak report is produced at program exit. If the value is verbose, a verbose memory leak report is produced at program exit. The value off causes no output. This variable has no effect on the showleaks command. The default is on.