This appendix provides detailed syntax and functional descriptions of all of the dbx commands.
In native mode, the assign command assigns a new value to a program variable. In Java mode, the assign command assigns a new value to a local variable or parameter.
assign variable = expression
where:
expression is the value to be assigned to variable.
assign identifier = expression
where:
expression is a valid Java expression, which can include any of the following:
class-name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
field-name is the name of a field in the class.
identifier is a local variable or parameter, including this, the current class instance variable (object-name.field-name) or a class (static) variable (class-name.field-name).
object-name is the name of a Java object.
The attach command attaches dbx to a running process, stopping execution and putting the program under debugging control. It has identical syntax and identical functionality in native mode and Java mode.
Begin debugging the program with process ID process-ID. dbx finds the program using /proc.
Begin debugging program-name with process ID process-ID.
Begin debugging program-name with process ID process-ID. program-name can be ‐. dbx finds it using /proc.
The -r option causes dbx to retain all watch commands, display commands, when commands, and stop commands. With no -r option, an implicit delete all command and undisplay 0 command are performed.
where:
process-ID is the process ID of a running process.
program-name is the path name of the running program.
For information on how to attach dbx to a running Java process, see Attaching dbx to a Running Java Application.
The bsearch command searches backward in the current source file. It is valid only in native mode.
Search backward for string in the current file.
Repeat search, using the last search string.
where:
string is a character string.
In native mode, the call command calls a procedure. In Java mode, the call command calls a method.
You can also use the call command to call a function. To display the return value use the print command.
Occasionally the called function hits a breakpoint. You can choose to continue using the cont command or abort the call by using pop -c. The latter method is useful also if the called function causes a segmentation fault.
call procedure ([parameters]) [–lang language] [–resumeone] [–m] [+m]
where:
language is the language of the called procedure.
procedure is the name of the procedure.
parameters are the procedure’s parameters.
–lang specifies the language of the called procedure and tells dbx to use the calling conventions of the specified language. This option is useful when the procedure being called was compiled without debugging information and dbx does not know how to pass parameters.
–resumeone resumes only one thread when the procedure is called. For more information, see Resuming Execution.
–m specifies that macro expansion be applied to the procedure and parameters when the dbxenv variable macro_expand is set to off.
+m specifies that macro expansion be skipped when the dbxenv variable macro_expand is set to on.
call [class-name.|object-name.] method-name ([parameters])
where:
class-name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
object-name is the name of a Java object.
method-name is the name of a Java method.
parameters are the method’s parameters.
The cancel command cancels the current signal. It is primarily used within the body of a when command (see when Command). It is valid only in native mode.
Signals are normally cancelled when dbx stops because of a signal. If a when command is attached to a signal event, the signal is not automatically cancelled. The cancel command can be used to explicitly cancel the signal.
The catch command catches the given signals. It is valid only in native mode.
Catching a given signal causes dbx to stop the program when the process receives that signal. If you continue the program at that point, the signal is not processed by the program.
Print a list of the caught signals.
Catch signals numbered number.
Catch signals named by signal. SIGKILL cannot be caught or ignored.
Catch all signals.
where:
number is the number of a signal.
signal is the name of a signal.
The check command enables checking of memory access, leaks, or usage and prints the current status of runtime checking (RTC). It is valid only in native mode.
The features of runtime checking that are enabled by this command are reset to their initial state by the debug command.
This section provides information about the options for the check command.
check [functions] [files] [loadobjects]
Equivalent to check –all; suppress all; unsuppress all in functions, files, and loadobjects
where:
functions is one or more function names.
files is one or more file names.
loadobjects is one or more load object names.
You can use this to focus runtime checking on places of interest.
The –access option enables checking. RTC reports the following errors:
Bad free
Duplicate free
Misaligned free
Misaligned read
Misaligned write
Out of memory
Read from array out-of-bounds memory
Read from unallocated memory
Read from uninitialized memory
Write to array out-of-bounds memory
Write to read-only memory
Write to unallocated memory
The default behavior is to stop the process after detecting each access error, which can be changed using the rtc_auto_continue dbxenv variable. When set to on, access errors are logged to a file. The log file name is controlled by the dbxenv variable rtc_error_log_file_name.
By default, each unique access error is only reported the first time it happens. You can change this behavior using the dbxenv variable rtc_auto_suppress. The default setting of this variable is on.
The syntax for the leaks option is:
check –leaks [–frames n] [–match m]
Enable leak checking. RTC reports the following errors:
Possible memory leak – The only pointer points in the middle of the block
Possible memory leak – Pointer to the block exists only in register
Memory leak – No pointers to the block
With leak checking enabled, an automatic leak report is generated when the program exits. All leaks including possible leaks are reported at that time. By default, a non-verbose report is generated, which can be changed through the dbxenv variable rtc_mel_at_exit. However, you can ask for a leak report at any time (see showleaks Command).
–frames n implies that up to n distinct stack frames are displayed when reporting leaks. –match m is used for combining leaks; if the call stack at the time of allocation for two or more leaks matches n frames, then these leaks are reported in a single combined leak report.
The default value of n is 8 or the value of m (whichever is larger). Maximum value of n is 16. The default value of m is 8.
The syntax for the –memuse option is:
check –memuse [–frames n] [–match m]
The –memuse option behaves similarly to the –leaks option and also enables a blocks-in-use report (biu) when the program exits. By default, a non-verbose blocks in use report is generated, which can be changed through the dbxenv variable rtc_biu_at_exit. At any time during program execution you can see where the memory in your program has been allocated (see showmemuse Command).
–frames n implies that up to n distinct stack frames will be displayed while reporting memory use and leaks. Use –match m to combine these reports. If the call stack at the time of allocation for two or more leaks matches m frames, then these leaks are reported in a single combined memory leak report.
The default value of n is 8 or the value of m, whichever is larger. The maximum value of n is 16. The default value of m is 8.
The syntax for the –all option is:
check –all [–frames n] [–match m]
Equivalent to:
check –access and check –memuse [–frames n] [–match m]
The value of the dbxenv variable rtc_biu_at_exit is not changed with check –all, so by default no memory use report is generated at exit. See dbx Command for the description of the rtc_biu_at_exit environment variable.
The clear command clears breakpoints. It is valid only in native mode.
Event handlers created using the stop command, trace command, or when command with the inclass argument, inmethod argument, infile argument, or infunction argument create sets of breakpoints. If the line you specify in the clear command matches one of these breakpoints, only that breakpoint is cleared. Once cleared in this manner, an individual breakpoint belonging to a set cannot be enabled again. However, disabling and then enabling the relevant event handler re-establishes all the breakpoints.
clear [filename: line]
where:
line is the number of a source code line, such that all breakpoints are cleared at the specified line
filename is the name of a source code file, such that all breakpoints at line line are cleared in the specified file.
If no file or line is specified, all breakpoints are cleared at the current stopping point.
The collector command collects performance data for analysis by the Performance Analyzer. It is valid only in native mode.
This section lists the collector commands and provides details about them.
Specify the mode for archiving an experiment when it terminates.
Control the collection of samples when dbx stops the target process.
Stop data collection and close the current experiment.
Enable the collector and open a new experiment .
Enable or disable collection of heap tracing data.
Specify hardware counter profiling settings.
Limit the amount of profiling data recorded.
Stop collecting performance data but leave experiment open.
Specify settings for collecting callstack profiling data.
Start performance data collection after pause.
Specify sampling settings.
Show current collector settings.
Inquire status about current experiment.
Experiment file control and settings.
Specify settings for collecting thread synchronization wait tracing data.
Specify settings for collecting thread analyzer data.
Report the version of libcollector.so that would be used to collect data.
where:
To start collecting data, type collector enable.
To stop data collection, type collector disable.
The collector archive command specifies the archiving mode to be used when the experiment terminates.
By default, normal archiving is used. For no archiving, specify off. To copy load objects into the experiment for portability, specify copy.
The collector dbxsample command specifies whether to record a sample when the process is stopped by dbx.
By default, a sample is collected when the process is stopped by dbx. To indicate not to collect a sample at this time, specify off.
The collector disable command causes the data collection to stop and the current experiment to be closed.
The collector enable command enables the collector and opens a new experiment.
The collector heaptrace command specifies options for collecting heap tracing (memory allocation) data.
By default, heap tracing data is not collected. To collect this data, specify on.
The collector hwprofile command specifies options for collecting hardware-counter overflow profiling data.
By default, hardware-counter overflow profile data is not collected. To collect this data, specify on.
Print out the list of available counters.
By default, hardware-counter overflow profile data is not collected. To collect this data, specify on. You can set the resolution of the counters to high or low. If you do not specify a resolution, it is set to normal. These options are similar to the collect command options. See the collect(1) man page for more information.
Add additional counters for hardware counter overflow profiles.
Specify hardware counter names and intervals.
where:
name is the name of a hardware counter.
interval is the collection interval in milliseconds.
name2 is the name of a second hardware counter.
interval2 is the collection interval in milliseconds.
Hardware counters are system-specific, so the choice of counters available depends on the system you are using. Many systems do not support hardware-counter overflow profiling. On these machines, the feature is disabled.
The collector limit command specifies the experiment file size limit.
collector limit value | unlimited | none
where:
value, in megabytes, limits the amount of profiling data recorded and must be a positive number. When the limit is reached, no more profiling data is recorded but the experiment remains open and sample points continue to be recorded. By default, there is no limit on the amount of data recorded.
If you have set a limit, specify unlimited or none to remove the limit.
The collector pause command causes the data collection to stop but leaves the current experiment open. Sample points are not recorded while the Collector is paused. A sample is generated prior to a pause, and another sample is generated immediately following a resume. Data collection can be resumed with the collector resume command.
The collector profile command specifies options for collecting profile data.
Specify the profile data collection mode.
Specify profile timer period, fixed or floating point, with an optional trailing m for milliseconds or u for microseconds.
The collector resume command causes the data collection to resume after a pause created by the collector pause command (see collector pause Command).
The collector sample command specifies the sampling mode and the sampling interval.
Specify sampling mode.
Specify sampling interval in seconds.
Record a sample with an optional name.
where:
seconds is the length of the sampling interval.
name is the name of the sample.
The collector show command shows the settings of one or more categories of options.
Show all settings
Show all settings
Show archive setting
Show call stack profiling settings
Show thread synchronization wait tracing settings
Show hardware counter data settings
Show heap tracing data settings
Show experiment size limits
Show sample settings
Show store settings
Show thread analyzer data settings
The collector status command inquires about the status of the current experiment. It returns the working directory and the experiment name.
The collector store command specifies the directory and file name where an experiment is stored.
collector store {–directory pathname | –filename filename | –group string}
where:
pathname is the pathname of the directory where an experiment is to be stored.
filename is the name of the experiment file.
string is the name of an experiment group.
The collector synctrace command specifies options for collecting synchronization wait tracing data.
By default, thread synchronization wait tracing data is not collected. To collect this data, specify on.
Specify threshold in microseconds. The default value is 1000. If calibrate is specified, the threshold value will be calculated automatically.
where:
microseconds is the threshold below which synchronization wait events are discarded.
The collector tha command specifies options for collecting thread analyzer data.
By default, thread analyzer data is not collected. To collect this data, specify on.
The collector version command reports the version of libcollector.so that would be used to collect data.
collector version
The cont command causes the process to continue execution. It has identical syntax and identical functionality in native mode and Java mode.
Continue execution. In a multithreaded process, all threads are resumed. Use Control-C to stop executing the program.
Continue execution with signal signal.
The id specifies which thread or LWP to continue.
Continue execution at line line. ID is required if the application is multithreaded.
If the dbx follow_fork_mode environment variable is set to ask and you have chosen stop, use this option to choose which process to follow. both is only applicable in the Oracle Solaris Studio DE.
The dalias command defines a dbx-style (csh-style) alias. It is valid only in native mode.
(dbx alias) List all currently defined aliases.
If a name is specified, list the definition, if any, of alias name.
If a definition is also specified, define name to be an alias for definition. definition can contain white space. A semicolon or newline terminates the definition.
where:
name is the name of an alias
definition is the definition of an alias.
dbx accepts the following csh history substitution meta-syntax, which is commonly used in aliases:
!:<n>
!-<n>
!^
!$
!*
The ! usually needs to be preceded by a backslash. For example:
dalias goto "stop at \!:1; cont; clear"
For more information, see the csh(1) man page.
The dbx command starts dbx.
Debug program-name.
If core is specified, debug program-name with corefile core.
If process-ID is specified, debug program-name with process ID process-ID.
If process ID is specified, debug process ID process-ID; dbx finds the program using /proc.
If core is specified, debug with corefile core.
Debug using corefile core.
Run program-name with arguments arguments. If abnormal termination, start debugging program-name, else just exit.
where:
program-name is the name of the program to be debugged.
process-ID is the process ID of a running process.
arguments are the arguments to be passed to the program.
options are the options listed in Options.
Debug program-name.
Debug program-name with process ID process ID.
Debug process ID process ID; dbx finds the program using /proc.
Run program-name with arguments arguments. If abnormal termination, start debugging program-name, else, just exit.
where:
program-name is the name of the program to be debugged.
process-id is the process ID of a running process.
arguments are the arguments to be passed to the program (not to the JVM software).
options are the options listed in Options.
The following table lists the options of the dbx command for both native mode and Java mode :
|
The dbxenv command is used to list or set dbxenv variables. It has the same syntax and functionality in native mode and Java mode.
Display the current settings of the dbxenv variables. If a dbxenv variable is specified, set the dbxenv variable to setting.
where:
environment-variable is a dbxenv variable.
setting is a valid setting for that variable.
The debug command lists or changes the program being debugged. In native mode, it loads the specified application and begins debugging the application. In Java mode, it loads the specified Java application, checks for the existence of the class file, and begins debugging the application.
Print the name and arguments of the program being debugged.
Begin debugging program-name with no process or core.
Begin debugging program-name with core file core.
Begin debugging program-name with process ID process-ID.
Begin debugging program with core file core. program-name can be -. dbx will attempt to extract the name of the executable from the core file. For details, see Debugging a Core File.
Begin debugging program-name with process ID process-ID. program-name can be -; dbx finds it using /proc.
Force loading of a core file, even if it does not match.
The –r option causes dbx to retain all display, trace, when, and stop commands. With no –r option, an implicit delete all and undisplay O are performed.
The –clone option causes another dbx process to begin execution, permitting debugging of more than one process at a time. Valid only if running in the Oracle Solaris Studio IDE.
Starts another dbx process debugging nothing. Valid only if running in the Oracle Solaris Studio IDE.
Start debugging program-name even if program-name begins with a dash.
where:
core is the name of a core file.
options are the options listed inOptions.
process-ID is the process ID of a running process.
program-name is the path name of the program.
Leaks checking and access checking are disabled when a program is loaded with the debug command. You can enable them with the check command.
Print the name and arguments of the program being debugged.
Begin debugging program-name with no process.
Begin debugging program-name with process ID process-ID.
Begin debugging program-name with process ID process-ID. program-name can be -; dbx finds it using /proc.
The -r option causes dbx to retain all watch commands, display commands, trace commands, when commands, and stop commands. With no -r option, an implicit delete all command and undisplay 0 command are performed.
The -clone option causes another dbx process to begin execution, permitting debugging of more than one process at a time. Valid only if running in the Oracle Solaris Studio IDE.
Starts another dbx process debugging nothing. Valid only if running in the Oracle Solaris Studio DE.
Start debugging program-name even if program-name begins with a dash.
where:
options are the options listed inOptions.
process-ID is the process ID of a running process.
program-name is the path name of the program.
Execute commands before prompting for input.
Used with –s, removes
Echo input commands.
Add directory_name to pathmap set (see pathmap Command.
Save and restore keyboard translation state.
Suppress messages about reading stabs.
Run program; if program exits normally, then exit.
Print the readme file for dbx.
Use file instead of current_directory/.dbxrc or $HOME/.dbxrc as the startup file
Suppress reading of initialization file /install-dir/lib/dbxrc.
Print the version of dbx.
Skip n frames on where command.
Marks the end of the option list; use this if the program name starts with a dash.
The delete command deletes breakpoints and other events. It has the same syntax and functionality in native mode and Java mode.
Remove trace commands, when commands, or stop commands of given handler-IDs. To remove hidden handlers, you must include the –h option.
Remove all trace commands, when commands, and stop commands excluding permanent and hidden handlers. Specifying –h removes hidden handlers as well.
Remove all temporary handlers.
Delete all the handlers that caused the latest stoppage.
where:
handler-ID is the identifier of a handler.
The detach command releases the target process from dbx’s control.
Detach dbx from the target, and cancel any pending signals.
If the –sig option is specified, detach while forwarding the given signal.
If the –stop option is specified, detach dbx from the target and leave the process in a stopped state. This option allows temporary application of other/proc-based debugging tools that might be blocked due to exclusive access. For an example, Detaching dbx From a Process.
where:
signal is the name of a signal.
Detach dbx from the target, and cancel any pending signals.
The dis command disassembles machine instructions. It is valid only in native mode.
Disassemble count instructions (default is 10), starting at address address.
Disassemble instructions from address1 through address2.
Disassemble 10 instructions, starting at the value of +.
where:
address is the address at which to start disassembling. The default value of address is the address after the last address previously assembled. This value is shared by the examine command.
address1 is the address at which to start disassembling.
address2 is the address at which to stop disassembling.
count is the number of instructions to disassemble. The default value of count is 10.
When used with a function address, disassembles the entire function. When used without parameters, disassembles the remains of the current visiting function, if any.
In native mode, the display command re-evaluates and prints expressions at every stopping point. In Java mode, the display command evaluates and prints expressions, local variables, or parameters at every stopping point. Object references are expanded to one level and arrays are printed itemwise.
The expression is parsed for the current scope at the time you type the command and reevaluated at every stopping point. Because the expression is parsed at entry time, the correctness of the expression can be immediately verified.
If you are running dbx in the IDE or dbxtool in the Sun Studio 12 release, the Sun Studio 12 Update 1 release, the Oracle Solaris Studio 12.2 release, or later updated releases, the display expression command effectively behaves like a watch $(which expression) command.
Print the list of expressions being displayed.
Display the value of expressions expression, ... at every stopping point. Because expression is parsed at entry time, the correctness of the expression is immediately verified.
See print Command for the meaning of these flags.
where:
expression is a valid expression.
format is the output format you want used to print the expression. For information on valid formats, see print Command.
Print the list of variables and parameters being displayed.
Display the value of variables and parameters of identifier, ... at every stopping point.
See print Command for the meaning of these flags.
where:
class-name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
expression is a valid Java expression.
field-name is the name of a field in the class.
format is the output format you want used to print the expression. For information about valid formats, see print Command.
identifier is a local variable or parameter, including this, the current class instance variable (object-name.field-name) or a class (static) variable (class-name.field-name).
object-name is the name of a Java object.
The down command moves down the call stack (away from main). It has the same syntax and functionality in native mode and Java mode.
Move down the call stack one level.
Move down the call stack number levels.
Move down the call stack, but do not skip hidden frames.
where:
number is a number of call stack levels.
The dump command prints all variables local to a procedure. It has the same syntax and functionality in native mode and Java mode.
Print all variables local to the current procedure.
If a procedure is specified, print all variables local to procedure.
where:
procedure is the name of a procedure.
The edit command invokes $EDITOR on a source file. It is valid only in native mode.
The edit command uses $EDITOR if dbx is not running in the Oracle Solaris Studio IDE. Otherwise, it sends a message to the IDE to display the appropriate file.
Edit the current file.
If a file name is specified, edit the specified file filename.
If a procedure is specified, edit the file containing function or procedure procedure.
where:
filename is the name of a file.
procedure is the name of a function or procedure.
The examine command shows memory contents. It is valid only in native mode.
The x command is an alias for the examine command.
Display the contents of memory starting at address for count items in format format.
Display the contents of memory from address1 through address2 inclusive, in format format.
Display the address (instead of the contents of the address) in the given format.
The address can be +, which indicates the address just after the last one previously displayed (the same as omitting it).
x is a predefined alias for examine.
where:
address is the address at which to start displaying memory contents. The default value of address is the address after the address whose contents were last displayed. This value is shared by the dis command.
address1 is the address at which to start displaying memory contents.
address2 is the address at which to stop displaying memory contents.
count is the number of addresses from which to display memory contents. The default value of count is 1.
format is the format in which to display the contents of memory addresses. The default format is X (hexadecimal) for the first examine command, and the format specified in the previous examine command for subsequent examine commands. The following values are valid for format:
octal (2 or 4 bytes)
hexadecimal (2 or 4 bytes)
octal (1 byte)
character
wide character
string
wide character string
hexadecimal and floating point (4 bytes, 6-digit precision)
hexadecimal and floating point (8 bytes, 14-digit precision )
same as F
hexadecimal and floating point (16 bytes, 14-digit precision)
decimal (4 bytes, same as D)
octal 94 bytes, same as O
hexadecimal (4 bytes, same as X)
decimal (8 bytes)
octal (8 bytes)
hexadecimal (8 bytes)
The exception command prints the value of the current C++ exception. It is valid only in native mode.
Prints the value of the current C++ exception, if any.
where:
-d enables showing dynamic exceptions.
+d disables showing dynamic exceptions.
The exists command checks for the existence of a symbol name. It is valid only in native mode.
Returns 0 if name is found in the current program, 1 if name is not found.
where:
name is the name of a symbol.
The file command lists or changes the current file. It has the same syntax and functionality in native mode and in Java mode.
Print the name of the current file.
If a file name is specified, change the current file.
where:
filename is the name of a file.
In native mode, the files command lists file names that match a regular expression. In Java mode, the files command lists all of the Java source files known to dbx. If your Java source files are not in the same directory as the .class or .jar files, dbx might not find them unless you have set the $JAVASRCPATH environment variable. For more information, see Specifying the Location of Your Java Source Files.
List the names of all files that contributed debugging information to the current program (those that were compiled with –g).
List the names of all files compiled with–g that match the given regular expression.
where:
regular-expression is a regular expression.
For example:
(dbx) files ^r myprog: retregs.cc reg_sorts.cc reg_errmsgs.cc rhosts.cc
List the names of all of the Java source files known to dbx.
The fix command recompiles modified source files and dynamically links the modified functions into the application. It is valid only in native mode. It is not valid on Linux platforms.
Fix the current file.
If file names are listed, fix files in list.
where:
–options are the following valid options.
Force fixing the file, even if source has not been modified.
Fix all modified files.
Strip –O flags and add –g flag.
Print compilation line (can include some options added internally for use by dbx).
Do not execute compile/link commands (use with -v).
Verbose mode (overrides dbx fix_verbose environment variable setting).
Non-verbose mode (overrides dbx fix_verbose environment variable setting).
The fixed command lists the names of all fixed files. It is valid only in native mode.
The fortran_modules command lists the Fortran modules in the current program, or the functions or variables in one of the modules.
Lists all Fortran modules in the current program.
If the –f option is specified, list all functions in the specified module.
If the –v option is specified, lists all variables in the specified module.
The frame command lists or changes the current stack frame number. It has identical syntax and identical functionality in native mode and in Java mode.
Display the frame number of the current frame.
Set the current frame to frame number.
Go number frames up the stack; default is 1.
Go number frames down the stack; default is 1.
Go to frame, even if frame is hidden.
where:
number is the number of a frame in the call stack.
In native mode, the func command lists or changes the current function. In Java mode, the func command lists or changes the current method.
Print the name of the current function.
If a procedure is specified, change the current function to the function or procedure procedure.
where:
procedure is the name of a function or procedure.
Print the name of the current method.
Change the current function to the method method-name.
where:
class-name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
method-name is the name of a Java method.
parameters are the method’s parameters.
The funcs command lists all function names that match a regular expression. It is valid only in native mode.
List all functions in the current program,
If -f filename is specified, list all functions in the file. If -g is specified, list all functions with debugging information. If filename ends in .o, then all functions, including those created automatically by the compiler, are listed. Otherwise, only functions appearing in the source code are listed.
If regular-expression is specified, list all functions that match the regular expression.
where:
filename is the name of the file for which you wish to list all the functions.
regular-expression is the regular expression for which you wish to list all the matching functions.
For example:
(dbx) funcs [vs]print ”libc.so.1”isprint ”libc.so.1”wsprintf ”libc.so.1”sprintf ”libc.so.1”vprintf ”libc.so.1”vsprintf
The gdb command supports the GDB command set. It is valid only in native mode.
Use gbd on to enter the GDB command mode under which dbx understands and accepts GDB commands. To exit the GDB command mode and return to the dbx command mode, type gdb off. dbx commands are not accepted while in GDB command mode and GDB commands are not accepted while in dbx mode. All debugging settings such as breakpoints are preserved across different command modes.
The following GDB commands are not supported in this release:
commands
define
handle
hbreak
interrupt
maintenance
printf
rbreak
return
signal
tcatch
until
The handler command modifies event handlers (enable, disable, and such). It has identical syntax and identical functionality in native mode and in Java mode.
A handler is created for each event that needs to be managed in a debugging session. The commands trace, stop, and when create handlers. Each of these commands returns a number known as the handler ID (handler-ID). The handler, status, and delete commands manipulate or provide information about handlers in a generic fashion.
Either enable or disable given handlers, specify handler-ID as all for all handlers. Use $firedhandlers instead of handler-ID to disable the handlers that caused the most recent stoppage.
Print value of trip counter for given handler.
If a new limit parameter is specified, set new count limit for given event.
Reset trip counter for given handler.
where:
handler-ID is the identifier of a handler.
The hide command hides stack frames that match a regular expression. It is valid only in native mode.
List the stack frame filters currently in effect.
If regular-expression is specified, hide stack frames matching regular-expression. The regular expression matches either the function name, or the name of the load object, and is a sh or ksh file matching style regular expression.
where:
regular-expression is a regular expression.
The ignore command tells the dbx process not to catch the given signals. It is valid only in native mode.
Ignoring a signal causes dbx not to stop when the process receives that kind of signal.
Print a list of the ignored signals.
If a signal number is specified, ignore signal numbered number.
If a signal is specified, ignore signals named by signal. SIGKILL cannot be caught or ignored.
where:
number is the number of a signal.
signal is the name of a signal.
The import command imports commands from a dbx command library. It has the same syntax and functionality in native mode and in Java mode.
Import commands from the dbx command library path-name.
where:
path-name is the path name of a dbx command library.
The intercept command throws (C++ exceptions) of the given type (C++ only). It is valid only in native mode.
dbx stops when the type of a thrown exception matches a type on the intercept list unless the type of the exception also matches a type on the excluded list. A thrown exception for which there is no matching catch is called an “unhandled” throw. A thrown exception that does not match the exception specification of the function it is thrown from is called an “unexpected” throw.
Unhandled and unexpected throws are intercepted by default.
Add throws of excluded-typename to the excluded list.
Add all types except excluded-typename to the intercept list.
Clear both the intercept list and the excluded list, and set the lists to intercept or exclude only throws of the specified types.
List intercepted types.
where:
included-typename and excluded-typename are exception type specifications such as List <int> or unsigned short.
The java command is used when dbx is in JNI mode to indicate that the Java version of a specified command is to be executed. It causes the specified command to use the Java expression evaluator, and when relevant, to display Java threads and stack frames.
java command
where:
command is the command name and arguments of the command to be executed.
The jclasses command prints the names of all Java classes known to dbx at the time you issue the command. It is valid only in Java mode.
Classes in your program that have not yet been loaded are not printed.
Print the names of all Java classes known to dbx.
If the –a option is specified, print system classes as well as other known Java classes.
The joffcommand switches dbx from Java mode or JNI mode to native mode.
The jon command switches dbx from native mode to Java mode.
The jpkgs command prints the names of all Java packages known to dbx at the time you issue the command. It is valid only in Java mode.
Packages in your program that have not yet been loaded are not printed.
The kill command sends a signal to a process. It is valid only in native mode.
List all known signal numbers, names, and descriptions.
Kill the controlled process.
Send the SIGTERM signal to the listed jobs.
If the –signal option is specified, send the given signal to the listed jobs.
where:
job can be a process ID or can be specified in any of the following ways:
Kill the current job.
Kill the previous job.
Kill job number number.
Kill the job that begins with string.
Kill the job that contains string.
where:
signal is the name of a signal.
The language command lists or changes the current source language. It is valid only in native mode.
Print the current language mode set by the dbx language_mode environment variable. If the language mode is set to autodetect or main, the command also prints the name of the current language used for parsing and evaluating expressions.
where:
language is c, c++, fortran, or fortran90.
The line command lists or changes the current line number. It has the same syntax and functionality in native mode and in Java mode.
Display the current line number.
If a number is specified, set the current line number to number.
If a file name is specified, set current line number to line 1 in filename.
If both are specified, set current line number to line number in file-name.
where:
filename is the name of the file in which to change the line number. The ““ quotation marks around the file name are optional. They are useful when your file name contains spaces.
number is the number of a line in the file.
line 100 line "/root/test/test.cc":100
The list command displays lines of a source file. It has the same syntax and functionality in native mode and in Java mode.
The default number of lines listed, N, is controlled by the dbx output_list_size environment variable.
List N lines.
List line number number.
List next N lines.
List next n lines.
List previous N lines.
List previous n lines.
List lines from n1 to n2.
List from n1 to n1 + N.
List from n1 to n1 + n2.
List from n1-N to n1.
List from n1-n2 to n1.
List the start of the source for function. list function changes the current scope. See Program Scope for more information.
List the start of the file filename.
List file filename from line n.
where:
filename is the file name of a source code file.
function is the name of a function to display.
number is the number of a line in the source file.
n is a number of lines to display.
n1 is the number of the first line to display.
n2 is the number of the last line to display. Where appropriate, the line number can be ”$” which denotes the last line of the file. Comma is optional.
Intermix source lines and assembly code.
List N (or n) lines (window) around line or function. This option is not allowed in combination with the plus sign (+) or minus sign (-) syntax or when two line numbers are specified.
When used with a function name, lists the entire function. When used without parameters, lists the remains of the current visiting function, if any.
list // list N lines starting at current line list +5 // list next 5 lines starting at current line list - // list previous N lines list -20 // list previous 20 lines list 1000 // list line 1000 list 1000,$ // list from line 1000 to last line list 2737 +24 // list line 2737 and next 24 lines list 1000 -20 // list line 980 to 1000 list test.cc:33 // list source line 33 in file test.cc list -w // list N lines around current line list -w8 ”test.cc”func1 // list 8 lines around function func1 list -i 500 +10 // list source and assembly code for line 500 to line 510
The listi command displays source and disassembled instructions. It is valid only in native mode. This command is the same as using list –i.
See list Command for details.
The loadobject command lists and manages symbolic information from load objects. It is valid only in native mode.
This section lists the loadobject options and provides details about them.
Show currently loaded load objects.
Load symbols for specified load object.
Unload specified load objects.
Remove load object from dbx's search algorithm.
Add load object to dbx's search algorithm.
Show various ELF details of the load object.
Don't automatically load loadobjects matching ex-regexp.
Clear the exclude list of patterns.
where:
regexp is a regular expression. If it is not specified, the command applies to all load objects.
ex-regexp is not optional, it must be specified.
This command has a default alias lo.
The loadobject -dumpelf command shows various ELF details of the load object. It is valid only in native mode.
loadobject -dumpelf [regexp]
where:
regexp is a regular expression. If it is not specified, the command applies to all load objects.
This command dumps out information related to the ELF structure of the load object file on disk. The details of this output are highly subject to change. If you want to parse this output, use the Oracle Solaris OS commands dump or elfdump.
The loadobject -exclude command tells dbx not to automatically load loadobjects matching the specified regular expression.
loadobject -exclude ex-regexp [-clear]
where:
ex-regexp is a regular expression.
This command prevents dbx from automatically loading symbols for load objects that match the specified regular expression. Unlike regexp in other loadobject subcommands, if ex-regexp is not specified, it does not default to all. If you do not specify ex-regexp, the command lists the excluded patterns that have been specified by previous loadobject -exclude commands.
If you specify -clear, the list of excluded patterns is deleted.
Currently this functionality cannot be used to prevent loading of the main program or the runtime linker. Also, using it to prevent loading of C++ runtime libraries could cause the failure of some C++ functionality.
This option should not be used with runtime checking (RTC).
The loadobject -hide command removes load objects from dbx’s search algorithm.
loadobject -hide [regexp]
where:
regexp is a regular expression. If it is not specified, the command applies to all load objects.
This command removes a load object from the program scope, and hides its functions and symbols from dbx. This command also resets the “preload” bit. For more information, refer to the dbx help file by typing the following into the dbx prompt.
(dbx) help loadobject preloading
The loadobject -list command shows currently loaded loadobjects. It is valid only in native mode.
loadobject -list [regexp] [-a]
where:
regexp is a regular expression. If it is not specified, the command applies to all load objects.
The full path name for each load object is shown along with letters in the margin to show status. Load objects that are hidden are listed only if you specify the -a option.
This letter means “hidden” (the symbols are not found by symbolic queries like whatis or stop in).
If there is an active process, u means “unmapped.”
This letter indicates a load object that is preloaded, that is, the result of a loadobject -load command or a dlopen event in the program.
For example:
(dbx) lo -list libm /usr/lib/64/libm.so.1 /usr/lib/64/libmp.so.2 (dbx) lo -list ld.so h /usr/lib/sparcv9/ld.so.1 (rtld)
This last example shows that the symbols for the runtime linker are hidden by default. To use those symbols in dbxcommands, see loadobject -use Command.
The loadobject -load command loads symbols for specified load objects. It is valid only in native mode.
loadobject -load load-object
where:
load-object can be a full path name or a library in /usr/lib, /usr/lib/sparcv9 or /usr/lib/amd64. If a program is being debugged, then only the proper ABI library directory will be searched.
The loadobject -unload command unloads specified load objects. It is valid only in native mode.
loadobject -unload [regexp]
where:
regexp is a regular expression. If it is not specified, the command applies to all load objects.
This command unloads the symbols for any load objects matching the regexp supplied on the command line. The main program loaded with the debug command cannot be unloaded. dbx might also refuse to unload other load objects that might be currently in use or critical to the proper functioning of dbx.
The loadobject -use command adds load objects from dbx’s search algorithm. It is valid only in native mode.
loadobject -use [regexp]
where:
regexp is a regular expression. If it is not specified, the command applies to all load objects.
The lwp command lists or changes the current LWP (lightweight process). It is valid only in native mode.
Display current LWP.
Switch to LWP lwp-ID.
Displays the name, home, and masked signals of the current LWP.
Tells dbx that the fp register has the value address-expression. The state of the program being debugged is not changed. A frame pointer set with the –setfp option is reset to its original value upon resuming execution.
Sets the frame pointer logical value from the register value in the current process or core file, undoing the effect of a previous lwp –setfp command.
where:
lwp-ID is the identifier of a lightweight process.
If the command is used with both an LWP ID and an option, the corresponding action is applied to LWP specified by the lwp-ID, but the current LWP is not changed.
The –setfp and –resetfp options are useful when the frame pointer (fp) of the LWP is corrupted. In this event, dbx cannot reconstruct the call stack properly and evaluate local variables. These options work when debugging a core file, where assign $fp=... is unavailable.
To make changes to the fp register visible to the application being debugged, use the assign $fp=address-expression command.
The lwps command lists all LWPs (lightweight processes) in the process. It is valid only in native mode.
The macro command prints the macro expansion of an expression.
macro expression, ...
The mmapfile command views the contents of memory mapped files that are missing from a core dump. It is valid only in native mode.
Oracle Solaris core files do not contain any memory segments that are read-only. Executable read-only segments (that is, text) are dealt with automatically and dbx resolves memory accesses against these by looking into the executable and the relevant shared objects.
View contents of memory mapped files missing from core dump.
where:
mmapped-file is the file name of a file that was memory mapped during a core dump.
address is the starting address of the address space of the process.
length is length in bytes of the address space to be viewed.
offset is the offset in bytes to the starting address in mmapped-file.
Read-only data segments typically occur when an application memory maps a database. For example:
caddr_t vaddr = NULL; off_t offset = 0; size_t = 10 * 1024; int fd; fd = open("../DATABASE", ...) vaddr = mmap(vaddr, size, PROT_READ, MAP_SHARED, fd, offset); index = (DBIndex *) vaddr;
The following command enables access to the database through the debugger as memory:
mmapfile ../DATABASE $[vaddr] $[offset] $[size]
Then, to look at your database contents in a structured way:
print *index
The module command reads debugging information for one or more modules. It is valid only in native mode.
Print the name of the current module.
If name is specified, read in debugging information for the module called name. If –a is specified, read in debugging information for all modules.
where:
name is the name of a module for which to read debugging information.
-a specifies all modules.
-f forces reading of debugging information, even if the file is newer than the executable. Use this option with caution!
-v specifies verbose mode, which prints language, file names, and such.
-q specifies quiet mode.
The modules command lists module names. It is valid only in native mode.
List all modules.
If –debug is specified, list all modules containing debugging information.
If –read is specified, list names of modules containing debugging information that have been read in already.
where:
-v specifies verbose mode, which prints language, file names, and such.
The native command is used when dbx is in Java mode to indicate that the native version of a specified command is to be executed. Preceding a command with native results in dbx executing the command in native mode. This means that expressions are interpreted and displayed as C expressions or C++ expressions, and certain other commands produce different output than they do in Java mode.
This command is useful when you are debugging Java code but you want to examine the native environment.
native command
where:
command is the command name and arguments of the command to be executed.
The next command steps one source line (stepping over calls).
The dbx step_events environment variable (see Setting dbxenv Variables) controls whether breakpoints are enabled during a step.
Step one line (step over calls). With multithreaded programs when a function call is stepped over, all LWPs (lightweight processes) are implicitly resumed for the duration of that function call in order to avoid deadlock. Non-active threads cannot be stepped.
Step n lines (step over calls).
Deliver the specified signal while stepping.
Step the specified thread.
Step the given LWP. Will not implicitly resume all LWPs when stepping over a function.
where:
n is the number of lines to step.
signal is the name of a signal.
thread-ID is a thread ID.
lwp-ID is an LWP ID.
When an explicit thread-id or lwp-ID is included, the deadlock avoidance measure of the generic next command is defeated.
See also nexti Command for machine-level stepping over calls.
Step one line (step over calls). With multithreaded programs when a function call is stepped over, all LWPs (lightweight processes) are implicitly resumed for the duration of that function call in order to avoid deadlock. Non-active threads cannot be stepped.
Step n lines (step over calls).
Step the given thread.
Step the given LWP. Will not implicitly resume all LWPs when stepping over a function.
where:
n is the number of lines to step.
thread-ID is a thread identifier.
lwp-ID is an LWP identifier.
When an explicit thread-ID or lwp-ID is included, the deadlock avoidance measure of the generic next command is defeated.
The nexti command steps one machine instruction (stepping over calls). It is valid only in native mode.
Step one machine instruction (step over calls).
Step n machine instructions (step over calls).
Deliver the given signal while stepping.
Step the given LWP.
Step the LWP on which the given thread is active. Will not implicitly resume all LWPs when stepping over a function.
where:
n is the number of instructions to step.
signal is the name of a signal.
thread-ID is a thread ID.
lwp-ID is an LWP ID.
The omp_loop command prints a description of the current loop, including scheduling (static, dynamic, guided, auto, or runtime), ordered or not, bounds, steps or strides, and number of iterations. You can issue the command only from the thread that is currently executing a loop.
The omp_pr command prints a description of the current or specified parallel region, including the parent region, parallel region id, team size (number of threads), and program location (program counter address).
Print a description of the current parallel region.
Print a description of the specified parallel region. This command does not cause dbx to switch the current parallel region to the specified region.
Print descriptions of all the parallel regions along the path from the current parallel region to the root of the current parallel region tree.
Print descriptions of all the parallel regions along the path from the specified parallel region to its root.
Print a description of the whole parallel region tree.
Print a description of the current parallel region with team member information.
The omp_serialize command serializes the execution of the next encountered parallel region for the current thread or for all threads in the current team. The serialization applies only to that one trip into the parallel region and does not persist.
Be sure you are in the right place in the program when you use this command. A logical place is just before a parallel directive.
Serialize the execution of the next encountered parallel region for the current thread.
If –team is specified, do this for all threads in the current team.
The omp_team command prints all the threads in the current team.
Print all the threads in the current team.
If a parallel region ID is specified, print all the threads in the team for the specified parallel region.
The omp_tr command prints a description of the current task region, including the task region ID, type (implicit or explicit), state (spawned, executing, or waiting), executing thread, program location (program counter address), unfinished children, and parent.
Print a description of the current task region.
Print a description of the specified task region. This command does not cause dbx to switch the current task region to the specified task region.
Print descriptions of all the task regions along the path from the current task region to the root of the current task region tree.
Print descriptions of all the task regions along the path from the specified task region to its root.
Print a description of the whole task region tree.
The pathmap command maps one path name to another for finding source files and such. The mapping is applied to source paths, object file paths, and the current working directory (if you specify -c). During macro skimming, it is also applied to include directory paths. The pathmap command has the same syntax and functionality in native mode and in Java mode.
The pathmap command is useful for dealing with automounted and explicit NFS mounted filesystems with different paths on differing hosts. Current working directories are inaccurate on automounted filesystems. Specify -c when you are trying to correct problems arising due to the automounter. The pathmap command is also useful if source or build trees are moved.
pathmap /tmp_mnt / exists by default.
The pathmap command is used to find load objects for core files when the dbxenv variable core_lo_pathmap is set to on. Other than this case, the pathmap command has no effect on finding load objects (shared libraries). For more information, see Debugging a Mismatched Core File.
Establish a new mapping from from to to.
Map all paths to to.
List all existing path mappings (by index).
The same, but the output can be read by dbx.
Delete the given mappings by path.
Delete the given mappings by index.
where:
from and to are path prefixes. from refers to the path compiled into the executable or object file and to refers to the path at debug time.
from1 is the path of the first mapping to be deleted.
from2 is the path of the last mapping to be deleted.
index specifies the index with which the mapping is to be inserted in the list. If you do not specify an index, the mapping is added to the end of the list.
index1 is the index of the first mapping to be deleted.
index2 is the index of the last mapping to be deleted.
If you specify -c, the mapping is applied to the current working directory as well.
If you specify -s, the existing mappings are listed in an output format that dbx can read.
If you specify -d, the specified mappings are deleted.
(dbx) pathmap /export/home/work1 /net/mmm/export/home/work2 # maps /export/home/work1/abc/test.c to /net/mmm/export/home/work2/abc/test.c (dbx) pathmap /export/home/newproject # maps /export/home/work1/abc/test.c to /export/home/newproject/test.c (dbx) pathmap (1) -c /tmp_mnt / (2) /export/home/work1 /net/mmm/export/home/work2 (3) /export/home/newproject
The pop command removes one or more frames from the call stack. It is valid only in native mode.
You can pop only to a frame for a function that was compiled with -g. The program counter is reset to the beginning of the source line at the call site. You cannot pop past a function call made by the debugger; but must use pop -c.
Normally, a pop command calls all the C++ destructors associated with the popped frames. You can override this behavior by setting the dbx pop_auto_destruct environment variable to off.
Pop the current top frame from stack.
Pop number frames from stack.
Pop frames from stack until specified frame number.
Pop the last call made from the debugger.
where:
number is the number of frames to pop from the stack.
In native mode, the print command prints the value of an expression. In Java mode, the print command prints the value of an expression, local variable, or parameter.
Print the value of the expression expression, ... .
Print the value of the expression expression including its inherited members.
Do not print inherited members when the dbx output_inherited_members environment variable is set to on.
Show dynamic type of expression expression instead of static type.
Don’t use dynamic type of expression expression when the dbx output_dynamic_type environment variable is set to on.
Print the value of expression expression for each thread in the current OpenMP parallel region if the expression contains private or thread-private variables.
Print the value of expression expression including its static members (C++ only)
Don't print static members when the dbxenv variable show_static_members is set to on (C++ only).
Call the prettyprint function.
Do not call the prettyprint function when the dbx output_pretty_print environment variable is on.
If the printing object expression is larger than 4K, enforce the printing.
If the expression is a string (char *), print the address only, do not print the literal.
('Literal’) Do not print the left side. If the expression is a string (char *), do not print the address, just print the raw characters of the string, without quotes.
Use format as the format for integers, strings, or floating-point expressions.
Use the given format but do not print the left hand side (the variable name or expression).
Print the value of expression, which must be an enumeration as an ordinal value. You can also use a format string here (-fformat). This option is ignored for non-enumeration expressions.
Apply macro expansion to expression when the dbxenv variable macro_expand is set to off.
Skip macro expansion of expression when the dbxenv variable macro_expand is set to on.
“--” signals the end of flag arguments. This is useful if expression can start with a plus or minus. SeeProgram Scope for scope resolution rules.
where:
expression is the expression whose value you want to print.
format is the output format you want used to print the expression. If the format does not apply to the given type, the format string is silently ignored and dbx uses its built-in printing mechanism.
The allowed formats are a subset of those used by the printf(3S) command. The following restrictions apply:
No n conversion.
No * for field width or precision.
No %<digits>$ argument selection.
Only one conversion specification per format string.
The allowed forms are defined by the following simple grammar:
FORMAT ::= CHARS % FLAGS WIDTH PREC MOD SPEC CHARS
CHARS ::= <any character sequence not containing a %>
| %%
| <empty>
| CHARS CHARS
FLAGS ::= + | - | <space> | # | 0 | <empty>
WIDTH ::= <decimal_number> | <empty>
PREC ::= . | . <decimal_number> | <empty>
MOD ::= h | l | L | ll | <empty>
SPEC ::= d | i | o | u | x | X | f | e | E | g | G |
c | wc | s | ws | p
If the given format string does not contain a %, dbx automatically prepends one. If the format string contains spaces, semicolons, or tabs, the entire format string must be surrounded by double quotes.
Print the values of the expressions expression, ... or identifier identifier, ....
Print the value of expression or identifier including its inherited members.
Do not print inherited members when the dbx output_inherited_members environment variable is set to on.
Show dynamic type of expression or identifier instead of static type.
Do not use dynamic type of expression or identifier when the dbx output_dynamic_type environment variable is set to on.
”--’ signals the end of flag arguments. This is useful if expression can start with a plus or minus. See Program Scope for scope resolution rules.
where:
class-name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
expression is the Java expression whose value you want to print.
field-name is the name of a field in the class.
identifier is a local variable or parameter, including this, the current class instance variable (object-name.field-name) or a class (static) variable (class-name.field-name).
object-name is the name of a Java object.
The proc command displays the status of the current process. It has identical syntax and identical functionality in native mode and in Java mode.
If –cwd is specified, show the current working directory of the current process.
If –map is specified, show the list of load objects with addresses.
If –process-ID is specified, show current process ID (process-ID).
The prog command manages programs being debugged and their attributes. It has the same syntax and functionality in native mode and Java mode.
Read symbolic information which was postponed by having set the dbx run_quick environment variable to on.
Prints the full path of the executable, - if the program was attached to using -.
Prints the whole argv, including argv[0].
Prints the argv, excluding argv[0].
Prints < filename or empty if stdin is used.
Prints > filename or >> filename or empty if stdout is used. The outputs of -args, -stdin, -stdout are designed so that the strings can be combined and reused with the run command.
The quit command exits dbx. It has the same syntax and functionality in native mode and Java mode.
If dbx is attached to a process, the process is detached from before exiting. If there are pending signals, they are cancelled. Use the detach command for fine control.
Exit dbx with return code 0. Same as exit.
Exit with return code n. Same as exit n.
where:
n is a return code.
The regs command prints the current value of registers. It is valid only in native mode.
regs [-f] [-F]
where:
-f includes floating-point registers (single precision) (SPARC platform only)
-F includes floating-point registers (double precision) (SPARC platform only)
dbx[13] regs -F current thread: t@1 current frame: [1] g0-g3 0x00000000 0x0011d000 0x00000000 0x00000000 g4-g7 0x00000000 0x00000000 0x00000000 0x00020c38 o0-o3 0x00000003 0x00000014 0xef7562b4 0xeffff420 o4-o7 0xef752f80 0x00000003 0xeffff3d8 0x000109b8 l0-l3 0x00000014 0x0000000a 0x0000000a 0x00010a88 l4-l7 0xeffff438 0x00000001 0x00000007 0xef74df54 i0-i3 0x00000001 0xeffff4a4 0xeffff4ac 0x00020c00 i4-i7 0x00000001 0x00000000 0xeffff440 0x000108c4 y 0x00000000 psr 0x40400086 pc 0x000109c0:main+0x4 mov 0x5, %l0 npc 0x000109c4:main+0x8 st %l0, [%fp - 0x8] f0f1 +0.00000000000000e+00 f2f3 +0.00000000000000e+00 f4f5 +0.00000000000000e+00 f6f7 +0.00000000000000e+00
The replay command replays debugging commands since the last run, rerun, or debug command. It is valid only in native mode.
Replay all or all minus number commands since last run command, rerun command, or debug command.
where:
number is the number of commands not to replay.
The rerun command runs the program with no arguments. It has the same syntax and functionality in native mode and Java mode.
Begin executing the program with no arguments.
Begin executing the program with new arguments by the save command (see save Command).
The restore command restores dbx to a previously saved state. It is valid only in native mode.
restore [filename ]
where:
filename is the name of the file to which the dbx commands executed since the last run, rerun, or debug command were saved.
The rprint command prints an expression using shell quoting rules. It is valid only in native mode.
Print the value of the expression. No special quoting rules apply, so rprint a > b puts the value of a (if it exists) into file b. See print Command for the meanings of the flags.
where:
expression is the expression whose value you want to print.
format is the output format you want used to print the expression. For information about valid formats, see print Command.
The rtc showmap command reports the address range of program text categorized by instrumentation type (branches and traps). It is valid only in native mode.
This command is intended for expert users. Runtime checking instruments program text for access checking. The instrumentation type can be a branch or a trap instruction based on available resources. The rtc showmap command reports the address range of program text categorized by instrumentation type. This map can be used to find an optimal location for adding patch area object files and to avoid the automatic use of traps. SeeRuntime Checking Limitations for details.
The rtc skippatch command excludes load objects, object files, and functions from being instrumented by runtime checking. The effect of the command is permanent to each dbx session unless the load object is unloaded explicitly.
Because dbx does not track memory access in load objects, object files, and functions affected by this command, incorrect rui errors might be reported for functions that were not skipped. dbx cannot determine whether an rui error was introduced by this command, so this type error was not suppressed automatically.
Exclude the specified object files and functions in the specified load object from being instrumented.
where:
load-object is the name of a load object or the path to the name of a load object.
object-file is the name of an object file.
function is the name of a function.
The run command runs the program with arguments.
Use Control-C to stop executing the program.
Begin executing the program with the current arguments.
Begin executing the program with new arguments.
Set the output redirection.
Set the input redirection.
where:
arguments are the arguments to be used in running the target process.
input-file is the file name of the file from which input is to be redirected.
output-file is the file name of the file to which output is to be redirected.
Begin executing the program with the current arguments.
Begin executing the program with new arguments.
where:
arguments are the arguments to be used in running the target process. They are passed to the Java application, not to the JVM software. Do not include the main class name as an argument.
You cannot redirect the input or output of a Java application with the run command.
Breakpoints you set in one run persist in subsequent runs.
The runargs command changes the arguments of the target process. It has identical syntax and identical functionality in native mode and Java mode.
Use the debug command with no arguments to inspect the current arguments of the target process.
Set the current arguments, to be used by the run command (see run Command).
Set the output redirection to be used by the run command.
Set the input redirection to be used by the run command.
Clear the current arguments.
where:
arguments are the arguments to be used in running the target process.
file is the file to which output from the target process or input to the target process is to be redirected.
The save command saves commands to a file. It is valid only in native mode.
Save all or all minus number commands since last run command, rerun command, or debug command to the default file or filename.
where:
number is the number of commands not to save.
filename is the name of the file to save the dbx commands executed since the last run, rerun, or debug command.
The scopes command prints a list of active scopes. It is valid only in native mode.
The search command searches forward in the current source file. It is valid only in native mode.
Search forward for string in the current file.
Repeat search, using last search string.
where:
string is the character string for which you wish to search.
The showblock command shows where the particular heap block was allocated from runtime checking. It is valid only in native mode.
When runtime checking is turned on, the showblock command shows the details about the heap block at the specified address. The details include the location of the blocks’ allocation and its size.
showblock -a address
where:
address is the address of a heap block.
In the default non-verbose case, a one-line report per leak record is printed. Actual leaks are reported followed by the possible leaks. Reports are sorted according to the combined size of the leaks.
showleaks [-a] [-m m] [-n number] [-v]
where:
-a shows all the leaks generated so far, not just the leaks since the last showleaks command.
-m m combines leaks; if the call stack at the time of allocation for two or more leaks matches m frames, then these leaks are reported in a single combined leak report. If the -m option is given, it overrides the global value of m specified with the check command.
-n number shows up to number records in the report. The default is to show all records.
-v Generate verbose output. The default is to show non-verbose output.
A one-line report per block-in-use record is printed. The commands sorts the reports according to the combined size of the blocks. Any leaked blocks since the last showleaks command are also included in the report.
showmemuse [-a] [-m m] [-n number] [-v]
where:
-a shows all the blocks in use (not just the blocks since the last showmemuse command).
-m m combines the blocks-in-use reports. The default value of m is 8 or the global value last given with the check command. If the call stack at the time of allocation for two or more blocks matches m frames, then these blocks are reported in a single combined report. If the -m option is given, it overrides the global value of m.
-n number shows up to number records in the report. The default is 20.
-v generates verbose output. The default is to show non-verbose output.
The source command executes commands from a given file. It is valid only in native mode.
Execute commands from file filename. $PATH is not searched.
The status command lists event handlers (breakpoints and such). It has identical syntax and identical functionality in native mode and Java mode.
Print trace, when, and stop breakpoints in effect.
Print status for handler handler-ID.
Print trace, when, and stop breakpoints in effect including the hidden ones.
The same, but the output can be read by dbx.
where:
handler-ID is the identifier of an event handler.
(dbx) status -s > bpts ... (dbx) source bpts
The step command steps one source line or statement, stepping into calls that were compiled with the -g option.
The dbx step_events environment variable controls whether breakpoints are enabled during a step.
The dbx step_granularity environment variable controls granularity of source line stepping.
The dbx step_abflow environment variable controls whether dbx stops when it detects that abnormal control flow change is about to occur. This type of control flow change can be caused by a call to siglongjmp() or longjmp() or an exception throw.
Single-step one line (step into calls). With multithreaded programs when a function call is stepped over, all threads are implicitly resumed for the duration of that function call in order to avoid deadlock. Non-active threads cannot be stepped.
Single-step n lines (step into calls).
Step up and out of the current function.
Deliver the specified signal while stepping. If a signal handler exists for the signal, step into it if the signal handler was compiled with the -g option.
Step the specified thread. Does not apply to step up.
Step the specified LWP. Does not implicitly resume all LWPs when stepping over a function.
Attempts to step into function called from the current source code line. If function is not specified, steps into the last function called, helping to avoid long sequences of step commands and step up commands. Examples of the last function are:
f()->s()-t()->last();
last(a() + b(c()->d()));
where:
n is the number of lines to step.
signal is the name of a signal.
thread-ID is a thread ID.
lip-ID is an LWP ID.
function is a function name.
When an explicit lwpID is specified, the deadlock avoidance measure of the generic step command is defeated.
When executing the step to command, while an attempt is made to step into the last assembly call instruction or step into a function (if specified) in the current source code line, the call might not be taken due to a conditional branch. In a case where the call is not taken or no function call is in the current source code line, the step to command steps over the current source code line. Take special consideration on user-defined operators when using the step to command.
See also stepi Command for machine-level stepping.
Single-step one line (step into calls). With multithreaded programs when a method call is stepped over, all threads are implicitly resumed for the duration of that method call in order to avoid deadlock. Non-active threads cannot be stepped.
Single-step n lines (step into calls).
Step up and out of the current method.
Step the specified thread. Does not apply to step up.
Step the specified LWP. Does not implicitly resume all LWPs when stepping over a method.
The stepi command steps one machine instruction (stepping into calls). It is valid only in native mode.
Single-step one machine instruction (step into calls).
Single step n machine instructions (step into calls).
Step and deliver the specified signal.
Step the given LWP.
Step the LWP on which the specified thread is active.
where:
n is the number of instructions to step.
signal is the name of a signal.
lwp-ID is an LWP ID.
thread-ID is a thread ID.
The stop command sets a source-level breakpoint.
The stop command has the following general syntax:
stop event-specification [modifier]
When the specified event occurs, the process is stopped.
This section describes some of the more important syntaxes that are valid in native mode. For information about additional events, see Setting Event Specifications.
Stop execution now. Only valid within the body of a when command.
Stop execution now but do not update the Oracle Solaris Studio IDE Debugger windows.
Stop execution when the memory specified by address-expression has been accessed. See also Stopping Execution When an Address Is Accessed.
Stop execution at line-number. See Setting a Breakpoint at a Line of Source Code.
Stop execution when the condition denoted by condition-expression evaluates to true.
Stop execution when function is called. See Setting a Breakpoint in a Function.
C++ only: Set breakpoints on all member functions of a class, struct, union, or template class. -norecurse is the default. If -recurse is specified, the base classes are included. See also Setting Breakpoints in All Member Functions of a Class.
C++ only: set breakpoints on all member functions name. See Setting Breakpoints in Member Functions of Different Classes.
C++ only: set breakpoint on entry into any non-static method of the class and all its base classes when called from the object object-expression. -recurse is the default. If -norecurse is specified, the base classes are not included. See Setting Breakpoints in Objects.
line-number is the number of a source code line.
function is the name of a function.
class-name is the name of a C++ class, struct, union, or template class.
mode specifies how the memory was accessed. It can be composed of one or all of the letters:
The memory at the specified address has been read.
The memory has been written to.
The memory has been executed.
mode can also contain the following:
Stops the process after the access (default).
Stops the process before the access.
name is the name of a C++ function.
object-expression identifies a C++ object.
variable is the name of a variable.
The following modifiers are valid in native mode.
The specified event occurs only when condition-expression evaluates to true.
Execution stops only if the specified event occurs during the extent of function.
Starting at 0, each time the event occurs, the counter is incremented. When number is reached, execution stops and the counter is reset to 0.
Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.
Create a temporary breakpoint that is deleted when the event occurs.
Create the breakpoint in a disabled state.
Do instruction-level variation. For example, step becomes instruction level stepping, and at takes a text address for an argument instead of a line number.
Make this event permanent across debug. Certain events (like breakpoints) are not appropriate to be made permanent. delete all will not delete permanent handlers. To delete permanent handlers, use delete hid.
Hide the event from the status command. Some import modules might choose to use this. Use status -h to see them.
Execution stops only if the specified event occurs in the specified LWP.
Execution stops only if the specified event occurs in the specified thread.
The following specific syntaxes are valid in Java mode.
Stop execution when the memory specified by class-name.field-name has been accessed.
Stop execution at line-number.
Stop execution at line-number in filename.
Stop execution when the value of field-name in class-name has changed.
Stop execution when any class is loaded.
Stop execution when class-name is loaded.
Stop execution when any class is unloaded.
Stop execution when class-name is unloaded.
Stop execution when the condition denoted by condition-expression evaluates to true.
Stop execution when class-name.method-name has been entered, and the first line is about to be executed. If no parameters are specified and the method is overloaded, a list of methods is displayed.
Stop execution when class-name.method-name has been entered, and the first line is about to be executed.
Set breakpoints on all non-member methods class-name.method-name.
Set breakpoints on all non-member methods class-name.method-name.
Stop execution when a Java exception has been thrown.
Stop execution when a Java exception of type has been thrown.
where:
class-name is the name of a Java class.. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
condition-expression can be any expression, but it must evaluate to an integral type.
field-name is the name of a field in the class.
filename is the name of a file.
line-number is the number of a source code line.
method-name is the name of a Java method.
mode specifies how the memory was accessed. It can be composed of one or all of the letters:
The memory at the specified address has been read.
The memory has been written to.
mode can also contain the following:
Stops the process before the access.
The program counter will point at the offending instruction.
parameters are the method’s parameters.
type is a type of Java exception. -unhandled or -unexpected are valid values for type.
The following modifiers are valid in Java mode:
The specified event occurs only when condition-expression evaluates to true.
Starting at 0, each time the event occurs, the counter is incremented. When number is reached, execution stops and the counter is reset to 0.
Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.
Create a temporary breakpoint that is deleted when the event occurs.
Create the breakpoint in a disabled state.
See stopi Command for information about setting a machine-level breakpoint.
For a list and the syntax of all events, see Setting Event Specifications.
The stopi command sets a machine-level breakpoint. It is valid only in native mode.
The stopi command has the following general syntax:
stopi event-specification [modifier]
When the specified event occurs, the process is stopped.
The following specific syntaxes are valid:
Stop execution at location address-expression.
Stop execution when function is called.
where:
address-expression is any expression resulting in or usable as an address.
function is the name of a function.
For a list and the syntax of all events, see Setting Event Specifications.
The suppress command suppresses reporting of memory errors during runtime checking. It is valid only in native mode.
If the dbx rtc_auto_suppress environment variable is set to on, the memory error at a given location is reported only once.
History of suppress and unsuppress commands, not including those specifying the -d and -reset options.
List of errors being suppressed in functions not compiled for debugging (default suppression). This list is per load object. These errors can be unsuppressed only by using the unsuppress command with the -d option.
Modify the default suppressions for all load objects by further suppressing errors.
Modify the default suppressions in the load-objects by further suppressing errors.
At error location suppress present error.
Set the default suppression to the original value (startup time).
Remove the unsuppress events as specified by the IDs, which can be obtained with the unsuppress command.
Remove all the unsuppress events as specified by the unsuppress command.
Suppress errors everywhere.
Suppress errors in list of functions, list of files, and list of load-objects.
Suppress errors at line.
Suppress errors at line in file.
Suppress errors at location address.
where:
address is a memory address.
errors are blank separated and can be any combination of the following:
All errors
Possible memory leak - address in block
Possible memory leak - address in register
Bad free
Duplicate free
Memory leak
Misaligned free
Misaligned read
Misaligned write
Out of memory
Read from array out-of-bounds memory
Read from unallocated memory
Read from uninitialized memory
Write to array out-of-bounds memory
Write to read-only memory
Write to unallocated memory
Block in use (allocated memory). Though not an error, you can use biu just like errors in the suppress commands.
file is the name of a file.
files is the names of one or more files.
functions is one or more function names.
line is the number of a source code line.
load-objects is one or more load object names.
See Suppressing Errors for more information about suppressing errors.
See unsuppress Command for information about unsuppressing errors.
The sync command shows information about a specified synchronization object. It is valid only in native mode.
Show information about the synchronization object at address.
where:
address is the address of the synchronization object.
The syncs command lists all synchronization objects (locks). It is valid only in native mode.
The thread command lists or changes the current thread.
Display current thread.
Switch to thread thread-ID.
In the following variations, the current thread is assumed if a thread ID is not specified.
Print everything known about the specified thread. For OpenMP threads, the information includes the OpenMP thread ID, parallel region ID, task region ID, and thread state.
Hide the specified (or current) thread. It will not show up in the generic threads listing.
Unhide the specified (or current) thread.
Unhide all threads.
Keep the specified thread from ever running. A suspended thread shows up with an “S” in the threads list.
Undo the effect of -suspend.
List all locks held by the specified thread blocking other threads.
Show which synchronization object the specified thread is blocked by, if any.
where:
thread-ID is a thread ID.
Display current thread.
Switch to thread thread-ID.
In the following variations, the current thread is assumed if a thread ID is not specified.
Print everything known about the specified thread.
Hide the specified (or current) thread. It will not show up in the generic threads listing.
Unhide the specified (or current) thread.
Unhide all threads.
Keep the specified thread from ever running. A suspended thread shows up with an “S” in the threads list.
Undo the effect of -suspend.
Lists the Java monitor owned by thread-ID.
Lists the Java monitor on which thread-ID is blocked.
where:
thread-ID is a dbx-style thread ID of the form t@number or the Java thread name specified for the thread.
The threads command lists all threads.
Print the list of all known threads.
Print threads normally not printed (zombies).
Controls whether all threads are printed or threads are filtered. The default is to filter threads. When filtering is on, threads that have been hidden by the thread -hide command are not listed.
Under the IDE, enables automatic updating of the thread listing.
Echo the current modes.
Each line of information is composed of the following:
An * (asterisk) indicating that an event requiring user attention has occurred in this thread. Usually this is a breakpoint.
An 'o’ instead of an asterisk indicates that a dbx internal event has occurred.
An > (arrow) denoting the current thread.
t@num, the thread ID, referring to a particular thread. The number is the thread_t value passed back by thr_create.
b l@num meaning the thread is bound (currently assigned to the designated LWP), or a l@num meaning the thread is active (currently scheduled to run).
The “Start function” of the thread as passed to thr_create. A ?() means that the start function is not known.
The thread state, which is one of the following:
monitor
running
sleeping
unknown
wait
zombie
The function that the thread is currently executing.
Print the list of all known threads.
Print threads normally not printed (zombies).
Controls whether all threads are printed or threads are filtered. The default is to filter threads.
Under the IDE, enables automatic updating of the thread listing.
Echo the current modes.
Each line of information in the listing is composed of the following:
An > (arrow) denoting the current thread
t@number, a dbx-style thread ID
The thread state, which is one of the following:
monitor
running
sleeping
unknown
wait
zombie
The thread name in single quotation marks
A number indicating the thread priority
The trace command shows executed source lines, function calls, or variable changes.
The speed of a trace is set using the dbx trace_speed environment variable.
If dbx is in Java mode and you want to set a trace breakpoint in native code, switch to Native mode using the joff command or prefix the trace command with native.
If dbx is in JNI mode and you want to set a trace breakpoint in Java code, prefix the trace command with java.
The trace command has the following general syntax:
trace event-specification [modifier]
When the specified event occurs, a trace is printed.
The following specific syntaxes are valid in native mode:
Direct all trace output to the specified file name. To revert trace output to standard output use - for filename. Trace output is always appended to filename. It is flushed whenever dbx prompts and when the application has exited. The file is always re-opened on a new run or resumption after an attach.
Trace each source line, function call, and return.
Trace each source line while in the specified function.
Trace given source line.
Trace calls to and returns from the specified function.
Trace calls to and returns from any function in filename.
Trace calls to any member function named function.
Trace when any function named function is called.
Trace calls to any member function of class.
Trace changes to the variable.
where:
filename is the name of the file to which you want trace output sent.
function is the name of a function.
line-number is the number of a source code line.
class is the name of a class.
variable is the name of a variable.
The following modifiers are valid in native mode.
The specified event occurs only when condition-expression evaluates to true.
Execution stops only if the specified event occurs in function.
Starting at 0, each time the event occurs, the counter is incremented. When number is reached, execution stops and the counter is reset to 0.
Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.
Create a temporary breakpoint that is deleted when the event occurs.
Create the breakpoint in a disabled state.
Do instruction-level variation. For example, step becomes instruction-level stepping, and at takes a text address for an argument instead of a line number.
Make this event permanent across debug. Certain events like breakpoints are not appropriate to be made permanent. delete all will not delete permanent handlers. To delete permanent handlers, use delete hid.
Hide the event from the status command. Some import modules might choose to use this. Use status -h to see them.
Execution stops only if the specified event occurs in the given LWP.
Execution stops only if the specified event occurs in the given thread.
The following specific syntaxes are valid in Java mode.
Direct all trace output to the specified filename. To revert trace output to standard output use - for filename. Trace output is always appended to filename. It is flushed whenever dbxprompts and when the application has exited. The file is always re-opened on a new run or resumption after an attach.
Trace line-number.
Trace specified source filename.line-number.
Trace calls to and returns from class-name. method-name.
Trace calls to and returns from class-name.method-name([parameters]).
Trace when any method named class-name.method-name is called.
Trace when any method named class-name.method-name [(parameters)] is called.
where:
class_name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
filename is the name of a file.
line-number is the number of a source code line.
method-name is the name of a Java method.
parameters are the method’s parameters
The following modifiers are valid in Java mode.
The specified event occurs and the trace is printed only when condition-expression evaluates to true.
Starting at 0, each time the event occurs, the counter is incremented. When number is reached, the trace is printed and the counter is reset to 0.
Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.
Create a temporary breakpoint that is deleted when the event occurs and the trace is printed. If -temp is used with -count, the breakpoint is deleted only when the counter is reset to 0.
Create the breakpoint in a disabled state.
For a list and the syntax of all events see Setting Event Specifications.
The tracei command shows machine instructions, function calls, or variable changes. It is valid only in native mode.
tracei is really a shorthand for trace event-specification -instr where the -instr modifier causes tracing to happen at instruction granularity instead of source-line granularity. When the event occurs, the printed information is in disassembly format instead of source-line format.
Trace each machine instruction.
Trace each instruction while in the specified function.
Trace the instruction at address.
Trace calls to and returns from the specified function.
Trace calls to any member function named function.
Trace when any function named function is called.
Trace calls to any member function of class.
Trace changes to the variable.
where:
address is any expression resulting in or usable as an address.
filename is the name of the file to which you want trace output sent.
function is the name of a function.
line is the number of a source code line.
class is the name of a class.
variable is the name of a variable.
See trace Command for more information.
The uncheck command disables checking of memory access, leaks, or usage. It is valid only in native mode.
Print the current status of checking.
Disable access checking.
Disable leak checking.
Disable memory use checking (leak checking is disabled as well).
Equivalent to uncheck -access; uncheck -memuse.
Equivalent to suppress all in functions files load-objects.
where:
functions is one or more function names.
files is one or more file names.
load-objects is one or more load object names
See check Command for information about enabling checking.
See suppress Command for information about suppressing errors.
See Capabilities of Runtime Checking for an introduction to runtime checking.
The undisplay command undoes display commands.
Undo a display expression command or all the display commands numbered n, ...
If n is set to zero (0), then undo all display commands.
where:
expression is a valid expression.
Undo a display expression, ... or display identifier, ... command.
Undo the display commands numbered n, ...
Undo all display commands.
where:
expression is a valid Java expression.
field-name is the name of a field in the class.
identifier is a local variable or parameter, including this, the current class instance variable (object-name.field-name), or a class (static) variable (class-name.field-name).
The unhide command undoes hide commands. It is valid only in native mode.
Delete stack frame filter regular-expression or delete stack frame filter number number
If number is set to zero (0), delete all stack frame filters.
where:
regular-expression is a regular expression.
number is the number of a stack frame filter.
The hide command lists the filters with numbers.
The unintercept command undoes intercept commands (C++ only). It is valid only in native mode.
Delete throws of type intercepted-typename from the intercept list.
Delete all throws of all types from intercept list.
Delete excluded-typename from excluded list.
Delete all throws of all types from the excluded list.
List intercepted types.
where:
included-typename and excluded-typename are exception type specifications such as List <int> or unsigned short.
The unsuppress command undoes suppress commands. It is valid only in native mode.
History of suppress and unsuppress commands (not those specifying the -d and -reset options).
List of errors being unsuppressed in functions that are not compiled for debugging. This list is per load object. Any other errors can be suppressed only by using the suppress command with the -d option.
Modify the default suppressions for all load objects by further unsuppressing errors.
Modify the default suppressions in the load-objects by further unsuppressing errors.
At error location unsuppress present error.
Set the default suppression mask to the original value (startup time).
Unsuppress errors everywhere.
Suppress errors in a list of functions, a list of files, and a list of load objects.
Unsuppress errors at line.
Unsuppress errors at line in filenames.
Unsuppress errors at location address.
where:
errors is one or more error names.
functions is one or more function names.
filenames is one or more file names.
line is a line number.
load-objects is one or more load object names
The unwatch command undoes a watch command. It is valid only in native mode.
Undo a watch expression command or the watch commands numbered n
If n is set to zero (0), then undo all watch commands.
where:
expression is a valid expression.
The up command moves up the call stack toward main. It has the same syntax and functionality in native mode and in Java mode.
Move up the call stack one level.
If number is specified, move up the call stack number levels.
If –h is specified, move up the call stack, but do not skip hidden frames.
where:
number is a number of call stack levels.
The use command lists or changes the directory search path. It is valid only in native mode.
This command is an anachronism and usage of this command is mapped to the following pathmap commands:
use is equivalent to pathmap -s
use directory is equivalent to pathmap directory.
The watch command evaluates and prints expressions at every stopping point in the scope current at that stop point. Because the expression is not parsed at entry time, the correctness of the expression cannot be immediately verified. The watch command is valid only in native mode.
Print the list of expressions being displayed.
Watch the value of expression expression at every stopping point. See print Command for the meaning of these flags.
where:
expression is a valid expression.
format is the output format you want used to print the expression. For information about valid formats, see print Command.
In native mode, the whatis command prints the type of expression or declaration of type, or the definition of a macro. It also prints OpenMP data-sharing attribute information when applicable.
In Java mode, the whatis command prints the declaration of an identifier. If the identifier is a class, it prints method information for the class, including all inherited methods.
Print the declaration of the non-type name, or the definition if name is a macro.
Print the declaration of the type type.
Print the type of the expression expression.
where:
name is the name of a non-type or macro.
type is the name of a type.
expression is a valid expression.
macro is the name of a macro.
–d shows dynamic type instead of static type.
–e displays the type of an expression.
–n displays the declaration of a non-type. It is not necessary to specify -n; this is the default if you type the whatis command with no options.
–r prints information about base classes and types.
–t displays the declaration of a type.
–u displays the root definition of a type.
–m forces macro expansion even if the dbxenv variable macro_expand is set to off.
+m defeats macro lookup so that any symbols that might have been shadowed by macros are found instead.
The whatis command, when run on a C++ class or structure, provides you with a list of all the defined member functions, the static data members, the class friends, and the data members that are defined explicitly within that class. Undefined member functions are not listed.
Specifying the –r (recursive) option adds information from the inherited classes.
The–d flag, when used with the –e flag, uses the dynamic type of the expression.
For C++, template-related identifiers are displayed as follows:
All template definitions are listed with whatis -t.
Function template instantiations are listed with whatis.
Class template instantiations are listed with whatis -t.
Print the declaration of identifier.
where:
identifier is a class, a method in the current class, a local variable in the current frame, or a field in the current class.
The when command executes commands when a specified event occurs.
If dbx is in Java mode and you want to set a when breakpoint in native code, switch to Native mode using the joff command or prefix the when command with native.
If dbx is in JNI mode and you want to set a when breakpoint in Java code, prefix the when command with java.
The when command has the following general syntax:
when event-specification [modifier]{command; ... }
When the specified event occurs, the commands are executed. The following commands are forbidden in the when command:
attach
debug
next
replay
rerun
restore
run
save
step
A cont command with no options is ignored.
The following specific syntaxes are valid in native mode:
Execute command when line-number is reached.
Execute command when procedure is called.
where:
line-number is the number of a source code line.
command is the name of a command.
procedure is the name of a procedure.
The following specific syntaxes are valid in Java mode.
Execute command when source line-number is reached.
Execute command when filename.line-number is reached.
Execute command when class-name.method-name is called.
Execute command when class-name.method-name([parameters]) is called.
class-name is the name of a Java class. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
filename is the name of a file.
line-number is the number of a source code line.
method-name is the name of a Java method.
parameters are the method’s parameters.
For a list and the syntax of all events, see Setting Event Specifications.
See wheni Command for information about executing commands on a specified low-level event.
The wheni command executes commands when a specified low-level event occurs. It is valid only in native mode.
wheni event-specification [modifier]{command... ; }
When the specified event occurs, the commands are executed.
The following specific syntax is valid:
Execute command when address is reached.
where:
address is any expression resulting in or usable as an address.
command is the name of a command.
For a list and the syntax of all events see Setting Event Specifications.
The where command prints the call stack. For OpenMP slave threads, the command also prints the master thread's stack trace if the relevant frames are still active.
Print a procedure traceback.
Print the number top frames in the traceback.
Start traceback from frame number.
Print traceback as if fp register had address-expression value.
Include hidden frames.
Include library name with function name.
Quick traceback (only function names).
Verbose traceback, which includes the function arguments and line information.
where:
address-expression is any expression resulting in or usable as an address.
number is a number of call stack frames.
Any of these options can be combined with a thread or LWP ID to obtain the traceback for the specified entity.
The –fp option is useful when the fp (frame pointer) register is corrupted, in which event dbx cannot reconstruct call stack properly. This option provides a shortcut for testing a value for being the correct fp register value. Once you have identified that the correct value has been identified, you can set it with an assign command or lwp command.
Print a method traceback.
Print the number top frames in the traceback.
If f is specified, start traceback from frame number.
Quick trace back (only method names).
Verbose traceback, which includes the method arguments and line information.
where:
number is a number of call stack frames.
thread-ID is a dbx-style thread ID or the Java thread name specified for the thread.
The whereami command displays the current source line. It is valid only in native mode.
Display the source line corresponding to the current location (top of the stack), and the source line corresponding to the current frame, if different.
Same as previous, except that the current disassembled instruction is printed instead of the source line.
The whereis command prints all uses of a specified name, or symbolic name of an address. It is valid only in native mode.
Print all declarations of name.
Print location of an address-expression.
where:
name is the name of a loadable object that is in scope, for example, a variable, function, class template, or function template.
address is any expression resulting in or usable as an address.
The which command prints the full qualification of a specified name. It is valid only in native mode.
Print full qualification of name.
Print full qualification of type.
where:
name is the name of loadable object that is in scope, for example, a variable, function, class template, or function template.
type is the name of a type.
–n displays the full qualification of a non-type. It is not necessary to specify –n; this is the default if you type the which command with no options.
–t displays the full qualification of a type.
–m forces macro lookup even if the dbxenv variable macro_expand is set to off.
+m defeats macro lookup so that any symbols that might have been shadowed by macros are found instead.
The whocatches command tells where a C++ exception would be caught. It is valid only in native mode.
Tell where (if at all) an exception of type type would be caught if thrown at the current point of execution. Assume the next statement to be executed is a throw x where x is of type type, and display the line number, function name, and frame number of the catch clause that would catch it.
Will return "type is unhandled" if the catch point is in the same function that is doing the throw.
where:
type is the type of an exception.