Go to main content
Oracle® Developer Studio 12.6: Debugging a Program with dbx

Exit Print View

Updated: June 2017

Setting dbxenv Variables

You can use the dbxenv command to set the dbxenv variables that customize your dbx sessions.

To display the value of a specific variable:

(dbx) dbxenv variable

To show all variables and their values

(dbx) dbxenv

To set the value of a variable:

(dbx) dbxenv variable value

Table 1 consists all of the dbxenv variables that you can set.

Table 1  dbx Environment Variables
dbx Environment Variable
What the Variable Does
array_bounds_check on|off
If set to on, dbx checks the array bounds. Default: on.
c_array_op on | off
Allows array operations for C and C++. For example, if a and b are arrays, you can use the command print a+b. Default: off.
Specifies to dbx a path for Java class files that are loaded by custom class loaders.
core_lo _pathmap on|off
Controls whether dbx uses pathmap settings to locate the correct libraries for a ismatchedcore file. Default: off.
Sets the global debug file directory. Default: /usr/lib/debug.
disassembler_version autodetect|v8|v9|x86_32|x86_64
SPARC platform: Sets the version of dbx’s built-in disassembler for SPARC V8 or V9. Default is autodetect, which sets the mode dynamically depending on the type of the machine a.out is running on.
x86 platforms: Sets the version of dbx's built-in disassembler for x86_32 or x86_64. Default is autodetect, which sets the mode dynamically depending on the type of the machine a.out is running on.
event_safety on | off
Protects dbx against unsafe use of events. Default: on.
filter_max_length num
Sets the maximum length of sequences converted to arrays by pretty-printing filters to num. Default value is set to 512.
fix_verbose on|off
Governs the printing of compilation line during a fix. Default: off.
follow_fork_inherit on|off
When following a child, determines whether to inherit breakpoints. Default: off.
follow_fork_mode parent|child|both|ask
Determines which process is followed after a fork; that is, when the current process executes a fork, vfork, or fork1. If set to parent, the process follows the parent. If set to child, it follows the child. If set to both, it follows the child, but the parent process remains active. If set to ask, you are asked which process to follow whenever a fork is detected. Default: parent.
follow_fork_mode_inner unset|parent|child|both
After a fork has been detected, if follow_fork_mode was set to ask and you chose stop, by setting this variable, you need not use cont -follow. Default: unset.
input_case_sensitive autodetect| true|false
If set to autodetect, dbx automatically selects case sensitivity based on the language of the file: false for Fortran files; otherwise true. If true, case matters in variable and function names; otherwise, case is not significant. Default: autodetect.
Specifies the directories in which dbx should look for Java source files.
jdbx_mode java| jni| native
Stores the current dbx mode. Valid settings are java, jni, or native.
The jvm_invocation environment variable enables you to customize the way the JVM software is started. (The terms “Java virtual machine” and “JVM” mean a virtual machine for the Java platform.) For more information, see Customizing Startup of the JVM Software.
language_mode autodetect|main|c| c++|fortran|fortran90
Governs the language used for parsing and evaluating expressions.
  • autodetect sets the expression language to the language of the current file. Useful if debugging programs with mixed languages (default).

  • main sets the expression language to the language of the main routine in the program. Useful if debugging homogeneous programs.

  • c, c++, c++, fortran, or fortran90 sets the expression language to the selected language.

macro_expand on | off
When set to on, globally enables macro expansion for selected expressions. Default: on.
macro_source none | compiler | skim | skim_unless_compiler
Governs where dbx gets macro information. See Skimming Errors for more information. Default: skim_unless_compiler.
mt_resume_one on | off | auto
When set to off, all threads are resumed when stepping over calls with the next command in order to avoid deadlocks. When set to on, only the current thread is resumed when stepping over calls with the next command. When set to auto, behavior is the same as when set to off unless the program is a transaction management application and you are stepping within a transaction, in which case only the current thread is resumed. Default: auto.
mt_scalable on|off
When enabled, dbx is more conservative in its resource usage and will be able to debug processes with upwards of 300 LWPs. However, this setting can result in significant slowdown. Default: off.
mt_sync_tracking on | off
Determines whether dbx enables tracking of sync objects when it starts a process. Default: off.
output_auto_flush on|off
Automatically calls fflush() after each call. Default: on
output_base 8|10|16|automatic
Default base for printing integer constants. Default: automatic (pointers in hexadecimal characters, all else in decimal).
output_class_prefix on | off
Used to cause a class member to be prefixed with one or more classnames when its value or declaration is printed. If set to on, it causes the class member to be prefixed. Default: on.
output_data_member_only on|off
Used to display data members only when printing definition of a class (dbx command whatis –t –a). When set to on, the –a option is the default (dbx command whatis –t will display data members only). Default: off.
output_dynamic_type on|off
When set to on, -d is the default for printing watches and displaying. Default: off.
output_inherited_members on|off
When set to on, -r is the default for printing, displaying, and inspecting. Default: off.
output_list_size num
Governs the default number of lines to print in the list command. Default: 10.
output_log_file_name filename
Name of the command log file.
Default: /tmp/dbx.log.unique-ID
output_max_object_size number
Sets maximum number of bytes for printing variable; if variable size larger than this number, specifying the –L flag is required. This dbxenv variable applies to commands print, display. and watch. Default: 4096.
output_max_string_length number
Sets number of characters printed for char *s. Default: 4096.
output_no_literal on|off
When enabled, if the expression is a string (char *), print the address only, do not print the literal. Default: off.
output_pretty_print on|off
Sets -p as the default for printing watches and displaying. Default: on.
output_pretty_print_fallback on|off
By default, pretty-printing reverts to regular printing if problems occur. If you want to diagnose a pretty-printing problem, set this variable to off to prevent the fallback. Default: on.
output_pretty_print_mode call | filter | filter_unless_call
Determines which pretty-printing mechanism is used. If set to call. uses call-style pretty-printers. If set to filter, uses python-based pretty-printers. If set to filter_unless_call, uses call-style pretty-printers first. Default: filter_unless_call
output_short_file_name on|off
Displays short path names for files. Default: on.
overload_function on|off
For C++, if set to on, does automatic function overload resolution. Default: on.
overload_operator on|off
For C++, if set to on, does automatic operator overload resolution. Default: on.
pop_auto_destruct on|off
If set to on, automatically calls appropriate destructors for locals when popping a frame. Default: on.
proc_exclusive_attach on|off
If set to on, keeps dbx from attaching to a process if another tool is already attached. Caution: If more than one tool attaches to a process and tries to control it unexpected results can occur. Default: on.
rtc_auto_continue on|off
Logs errors to rtc_error_log_file_name and continues. Default: off.
rtc_auto_suppress on|off
If set to on, an RTC error at a given location is reported only once. Default: on.
rtc_biu_at_exit on|off|verbose
Used when memory use checking is on explicitly or because of check -all. If the value is on, a non-verbose memory use (blocks in use) report is produced at program exit. If the value is verbose, a verbose memory use report is produced at program exit. The value off causes no output. Default: on.
rtc_error_limit number
The number of RTC access errors to be reported. Default: 1000.
rtc_error_log_file_name filename
Name of file to which RTC errors are logged if rtc_auto_continue is set. Default:/tmp/dbx.errlog.
rtc_error_stack on|off
If set to on, stack traces show frames corresponding to RTC internal mechanisms. Default: off.
rtc_inherit on|off
If set to on, enables runtime checking on child processes that are executed from the debugged program and causes the LD_PRELOAD environment variable to be inherited. Default: off.
rtc_mel_at_exit on|off|verbose
Used when memory leak checking is on. If the value 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. Default: on.
run_autostart on|off
If set to on with no active program, step, next, stepi, and nexti implicitly run the program and stop at the language-dependent main routine. If set to on, cont implies run when necessary. Default: off.
run_io stdio|pty
Governs whether the user program’s input/output is redirected to dbx’s stdio or a specific pty. The pty is provided by run_pty. Default: stdio.
run_pty ptyname
Sets the name of the pty to use when run_io is set to pty. ptys are used by graphical user interface wrappers.
run_quick on|off
If set to on, no symbolic information is loaded. The symbolic information can be loaded on demand using prog -readsysms. Until then, dbx behaves as if the program being debugged is stripped. Default: off.
run_savetty on | off
Multiplexes TTY settings, process group, and keyboard settings (if -kbd was used on the command line) between dbx and the program being debugged. Useful when debugging editors and shells. Set to on if dbx gets SIGTTIN or SIGTTOU and pops back into the shell. Set to off to gain a slight speed advantage. The setting is irrelevant if dbx is attached to the program being debugged or is running in the Oracle Developer Studio IDE. Default: off.
run_setpgrp on | off
If set to on, when a program is run, setpgrp(2)is called right after the fork. Default: off.
scope_global_enums on | off
If set to on, enumerators are put in global scope and not in file scope. Set before debugging information is processed (~/.dbxrc). Default: off.
scope_look_aside on | off
If set to on, finds file static symbols, in scopes other than the current scope. Default: on.
session_log_file_name filename
Name of the file where dbx logs all commands and their output. Output is appended to the file. Default: “ “(no session logging).
When set to on, –S is the default for printing, watches, and displaying. Default: on.
stack_find_source on | off
When set to on, dbx attempts to find and automatically make active the first stack frame with source when the program being debugged comes to a stop in a function that is not compiled with -g.
Default: on.
stack_max_size number
Sets the default size for the where command. Default: 100.
stack_verbose on | off
Governs the printing of arguments and line information in where. Default: on.
step_abflow stop|ignore
When set to stop, dbx stops in longjmp(), siglongjmp(), and throw statements when single stepping. When set to ignore, dbx does not detect abnormal control flow changes for longjmp() and siglongjmp(). Default: stop.
step_events on |off
When set to on, allows breakpoints while using step and next commands to step through code. Default: off.
step_granularity statement | line
Controls granularity of source line-stepping. When set to statement the following code:
a(); b();
takes the two next commands to execute. When set to line, a single next command executes the code. The granularity of line is particularly useful when dealing with multi-line macros. Default: statement.
suppress_startup_message number
Sets the release level below which the startup message is not printed. Default: 3.01.
symbol_info_compression on|off
When set to on, reads debugging information for each include file only once. Default: on.
trace_speed number
Sets the speed of tracing execution. Value is the number of seconds to pause between steps. Default: 0.50.
vdl_mode classic | lisp | xml
Value Description Language (VDL) is used to communicate data structures to the graphical user interface (GUI) for dbx. classic mode was used for the Sun WorkShop IDE. lisp mode is used by the IDE in Sun Studio and Oracle Developer Studio releases. xml mode is experimental and unsupported. Default: value is set by the GUI.