This appendix gives 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:
class_name is the name of a Java class, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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.
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, andstop commands. With no -r option, an implicit delete all command andundisplay 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.
Ensure that the JVMTM software can find libdbx_agent.so by adding libdbx_agent.so to your LD_LIBRARY_PATH. libdbx_agent.so:
If you are using the 32-bit version of the JVM software on a system running the Solaris OS, add /installation_directory/libdbx_agent.so to LD_LIBRARY_PATH.
If you are using the 64-bit version of the JVM software on a SPARC based system running the Solaris OS, add /installation_directory/lib/v9/libdbx_agent.so to LD_LIBRARY_PATH.
If you are using the 64-bit version of the JVM software on an x64 based system running the Solaris OS or the Linux OS, add /installation_directory/lib/amd64/libdbx_agent.so to LD_LIBRARY_PATH.
The installation_directory is the location where the Sun Studio software is installed.
Start your Java application by typing:
java -Djava.compiler=NONE -Xdebug -Xnoagent -Xrundbx_agent myclass.class
Then you can attach to the process by starting dbx with the process id:
dbx -process_id
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.
call procedure ([parameters]) [-lang language] [-resumeone]
where:
language is the language of the called procedure.
procedure is the name of the procedure.
parameters are the procedure’s parameters.
You can also use the call command to call a function; to see the return value use the print command (see print Command).
Occasionally the called function hits a breakpoint. You can choose to continue using the cont command (see cont Command), or abort the call by using pop -c (see pop Command). The latter is useful also if the called function causes a segmentation fault.
The -lang option 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.
The -resumeone option resumes only one thread when the procedure is called. For more information, see Resuming Execution.
call [class_name.|object_name.] method_name ([parameters]}
where:
class_name is the name of a Java class, using either the package path (using period (.) as a qualifier for example, test1.extra.T1.Inner) or 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.
Occasionally the called method hits a breakpoint. You can choose to continue using the cont command (see cont Command, or abort the call by using pop -c (see pop Command). The latter is useful also if the called method causes a segmentation fault.
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.
cancel
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.
check -access
Turn on access 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 dbx environment variable. When set to on access errors are logged to a file (the file name is controlled by the dbx environment variable rtc_error_log_file_name). See dbxenv Command.
By default each unique access error is only reported the first time it happens. Change this behavior using the dbx environment variable rtc_auto_suppress (the default setting of this variable is on). See dbxenv Command.
check -leaks [-frames n] [-match m]
Turn on leak checking. RTC reports the following errors:
Possible memory leak - 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 turned on, you get an automatic leak report when the program exits. All leaks including possible leaks are reported at that time. By default, a non-verbose report is generated (controlled by the dbx environment 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. -matchm 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 3 for C++, and 2 otherwise.
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 (controlled by the dbx environment 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. -matchm is used for combining these reports; if the call stack at the time of allocation for two or more leaks matches m frames, then these are reported in a single combined memory 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 3 for C++, and 2 otherwise. See check -leaks as well.
check -all [-frames n] [-match m]
Equivalent to check -access and check -memuse [-frames n] [-match m]
The value of the dbx environment 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.
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.
To detect all errors, RTC does not require the program be compiled -g. However, symbolic ( -g) information is sometimes needed to guarantee the correctness of certain errors (mostly read from uninitialized memory). For this reason certain errors ( rui for a.out and rui + aib + air for shared libraries) are suppressed if no symbolic information is available. This behavior can be changed by using suppress and unsuppress.
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 theclear 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 reestablishes all the breakpoints.
Clear all breakpoints at the current stopping point.
Clear all breakpoints at line.
Clear all breakpoints at line in filename.
where:
line is the number of a source code line.
filename is the name of a source code file.
The collector command collects performance data for analysis by the Performance Analyzer. It is valid only in native mode.
Specify one or more of the collector commands
Specify the mode for archiving an experiment when it terminates (see collector archive Command).
Control the collection of samples when dbx stops the target process (see collector dbxsample Command).
Stop data collection and close the current experiment (see collector disable Command).
Enable the collector and open a new experiment (see collector enable Command).
Enable or disable collection of heap tracing data (see collector heaptrace Command)
Specify hardware counter profiling settings (see collector hw_profile Command).
Limit the amount of profiling data recoreded (see collector limit Command).
Enables or disables collection of MPI tracing data (see collector mpitrace Command).
Stop collecting performance data but leave experiment open (see collector pause Command).
Specify settings for collecting callstack profiling data (see collector profile Command).
Start performance data collection after pause (see collector resume Command).
Specify sampling settings (see collector sample Command
Show current collector settings (see collector show Command).
Inquire status about current experiment (see collector status Command).
Experiment file control and settings (see collector store Command).
Specify settings for collecting thread synchronization wait tracing data (see collector synctrace Command).
Specify settings for collecting thread analyzer data (see collector tha Command.
Report the version of libcollector.so that would be used to collect data (see collector version Command).
where:
options are the settings that can be specified with each command.
To start collecting data, type either collector enable.
To turn off 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 loadobjects into the experiment for portability, specify copy.
The collector dbxsample command specifies whether or not 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 not 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.
collector disable
The collector enable command enables the collector and opens a new experiment.
collector enable
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 hw_profile 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.
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 to you 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
where:
value, in megabytes, limits the amount of profiling data recorded. When the limit is reached, no more profiling data is recorded but the experiment remains open and sample points continue to be recorded. The default limit on the amount of data recorded is 2000 Mbytes.
The collector mpitrace command specifies options for collecting MPI tracing data.
By default, MPI tracing data is not collected. To collect this data, specify on.
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 resum. Data collection can be resumed with the collector resume command (see collector resume Command).
collector pause
The collector profile command specifies options for collecting profile data.
Specify 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).
collector resume
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 MPI trace data settings.
Show sample settings.
Show store settings.
Show thread analyzer data settings.
The collector status command inquires about the status of the current experiment.
collector status
The collector store command specifies the directory and file name where an experiment is stored.
Specify directory where experiment is stored.
Specify experiment file name.
Specify experiment group name.
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.
Threshold value will be calculated automatically.
where:
microseconds is the threshold below which synchronization wait events are discarded.
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 an MT 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 multi-threaded.
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 Sun Studio IDE.
The dalias command defines a dbx-style (csh-style) alias. It is valid only in native mode.
(dbx alias) List all currently defined aliases.
List the definition, if any, of alias name.
Define name to be an alias for definition. definition may 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.
Debug program_name with corefile core.
Debug program_name with process ID process_id.
Debug process ID process_id; dbx finds the program using /proc.
Debug using corefile core; see also debug Command.
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.
For both native mode and Java mode, options are the following options:
-B |
Suppress all messages; return with exit code of program being debugged. |
-c commands |
Execute commands before prompting for input. |
-C |
Preload the Runtime Checking library (see check Command). |
-d |
Used with -s, removes file after reading. |
-e |
Echo input commands. |
-f |
Force loading of core file, even if it doesn’t match. |
-h |
Print the usage help on dbx. |
-I dir |
Add dir to pathmap set (see pathmap Command). |
-k |
Save and restore keyboard translation state. |
-q |
Suppress messages about reading stabs. |
-r |
Run program; if program exits normally, exit. |
-R |
Print the readme file on dbx. |
-s file |
Use file instead of /current_directory/.dbxrc or $HOME/.dbxrc as the startup file |
-S |
Suppress reading of initialization file /installation_directory/lib/dbxrc. |
-V |
Print the version of dbx. |
-w n |
Skip n frames on where command. |
-x exec32 |
Run the 32-bit dbx binary instead of the 64-bit dbx binary that runs by default on systems running a 64-bit OS. |
-- |
Marks the end of the option list; use this if the program name starts with a dash. |
The dbxenv command is used to list or set dbx environment variables. It has identical syntax and identical functionality in native mode and Java mode.
Display the current settings of the dbx environment variables.
Set environment_variable to setting.
where:
environment_variable is a dbx environment 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 may 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 may be -; dbx finds it using /proc.
Force loading of a core file, even if it doesn’t match.
The -r option causes dbx to retain all display, trace, when, and stop commands. With no -r option, an implicit delete all andundisplay 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 Sun Studio IDE.
Starts another dbx process debugging nothing. Valid only if running in the Sun 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.
pid is the process ID of a running process.
program_name is the path name of the program.
Leaks checking and access checking are turned off when a program is loaded with the debug command. You can enable them with the check command (see 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 may be -; dbx finds it using /proc
The -r option causes dbx to retain all watch commands, display commands, trace commands, when commands, andstop commands. With no -r option, an implicitdelete 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 Sun Studio IDE.
Starts another dbx process debugging nothing. Valid only if running in the Sun Studio IDE.
Start debugging program_name, even if program_name begins with a dash.
where:
file_name is the name of a 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.
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 /installation_directory/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 identical syntax and identical 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 give 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.
Detach while forwarding the given signal.
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, see 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 + (see examine Command).
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 (see 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 reevaluates 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 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 in the Sun Studio 12 release or the Sun Studio 12 Update 1 release, 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.
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, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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 on 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 identical syntax and identical 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 don’t skip hidden frames.
where:
number is a number of call stack levels.
The dump command prints all variables local to a procedure. It has identical syntax and identical functionality in native mode and Java mode.
Print all variables local to the current procedure.
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 Sun Studio IDE. Otherwise, it sends a message to the IDE to display the appropriate file.
Edit the current file.
Edit the specified file file_name.
Edit the file containing function or procedure procedure.
where:
file_name if 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.
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 may 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 (see 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.
See the print Command for the meaning of the -d flag.
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 identical syntax and identical functionality in native mode and in Java mode.
Print the name of the current file.
Change the current file.
where:
file_name 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 (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.
Fix files in list.
Force fixing the file, even if source hasn’t been modified.
Fix all modified files.
Strip -O flags amd add -g flag.
Print compilation line (may 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.
fixed
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.
Lists all functions in the specified module.
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.
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, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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 file_name is specified, list all functions in the file. If -g is specified, list all functions with debugging information. If file_name ends in .o, then all functions, including those created automatically by the compiler, are listed. Otherwise only functions appearing the source code are listed.
If regular_expression is specified, list all functions that match the regular expression.
where:
file_name 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; 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 whencreate handlers. Each of these commands returns a number known as the handler ID (handler_id). The handler, status, anddelete commands manipulate or provide information about handlers in a generic fashion.
Enable given handlers, specify handler_id as all for all handlers.
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.
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.
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.
Ignore signal numbered number.
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 identical syntax and identical 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 doesn’t 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 when you give 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.
Print system classes as well as other known Java classes.
The joffcommand switches dbx from Java mode or JNI mode to native mode.
joff
The jon command switches dbx from native mode to Java mode.
jon
The jpkgs command prints the names of all Java packages known to dbx when you give the command. It is valid only in Java mode.
Packages in your program that have not yet been loaded are not printed.
jpkgs
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.
Send the given signal to the listed jobs.
where:
job may be a process ID or may 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.
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 (see Setting dbx Environment Variables). 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.
c is an alias for ansic.
The line command lists or change the current line number. It has identical syntax and identical functionality in native mode and in Java mode.
Display the current line number.
Set the current line number to number.
Set current line number to line 1 in file_name.
Set current line number to line number in file_name.
where:
file_name is the name of the file in which to change the line number. The ““ around the filename is optional.
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 identical syntax and identical 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 file_name.
List file filename from line n.
where:
file_name 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 ”+” or ”-” 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.
See list Command for details.
The loadobject command lists and manages symbolic information from load objects. It is valid only in native mode.
Show currently loaded load objects (see loadobject -list Command
Load symbols for specified load object (see loadobject -load Command).
Unload specified load objects (see loadobject -unload Command).
Remove load object from dbx's search algorithm (see loadobject -hide Command).
Add load object to dbx's search algorithm (see loadobject -use Command).
Show various ELF details of the load object (see loadobject -dumpelf Command).
Don't automatically load load objects matching ex_regexp (see loadobject -exclude Command).
Clear the exclude list of patterns (see loadobject -exclude Command).
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 Solaris OS commands dump or elfdump.
The loadobject -exclude command tells dbx not to automatically load load objects 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 loadobjects 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
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 loadobject
where:
loadobject can be a full path name or a library in /usr/lib, /usr/lib/sparcv9, or /usr/lib/amd64. If there is a program 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 may 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.
The lwp command is available only on Solaris platforms.
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. debugging a core file, where assign $fp=... is unavailable. 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, 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 lwps command is available only on Solaris platforms.
List all LWPs in the current process.
The mmapfile command views the contents of memory mapped files that are missing from a core dump. It is valid only in native mode.
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;
To be able to access the database through the debugger as memory you would type:
mmapfile ../DATABASE $[vaddr] $[offset] $[size]
Then you could look at your database contents in a structured way by typing:
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.
Read in debugging information for the module called name.
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 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.
List all modules containing debugging information.
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 dbx Environment 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 given signal while stepping.
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.
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 given, the deadlock avoidance measure of the generic next command is defeated.
See also nexti Command for machine-level stepping over calls.
For information on lightweight processes (LWPs), see the Solaris Multithreaded Programming Guide.
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 lwpid is given, the deadlock avoidance measure of the generic next command is defeated.
For information on lightweight processes (LWPs), see the Solaris Multithreaded Programming Guide. .
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 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). The pathmap command has identical syntax and identical 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. Specify -c when you are trying to correct problems arising due to the automounter since CWD’s are inaccurate on automounted filesystems as well. 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 dbx environment variable core_lo_pathmap is set to on. Other than this case, the pathmap command has no effect on finding load objects (shared libraries). 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 filepath prefixes. from refers to the filepath compiled into the executable or object file and to refers to the filepath at debug time.
from1 is filepath of the first mapping to be deleted.
from2 is filepath 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 callsite. You cannot pop past a function call made by the debugger; 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 (see Setting dbx Environment Variables).
Pop 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 (C++ only).
Don’t print inherited members when the dbx output_inherited_members environment variable is on (C++ only).
Show dynamic type of expression expression instead of static type (C++ only).
Don’t use dynamic type of expression expression when the dbx output_dynamic_type environment variable is 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 may also use a format string here (-fformat). This option is ignored for non-enumeration expressions.
“--” signals the end of flag arguments. This is useful if expression may 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.
Don’t print inherited members when the dbx output_inherited_members environment variable is on.
Show dynamic type of expression or identifier instead of static type.
Don’t use dynamic type of expression or identifier when the dbx output_dynamic_type environment variable is on.
”--’ signals the end of flag arguments. This is useful if expression may start with a plus or minus (see Program Scope for scope resolution rules.
where:
class_name is the name of a Java class, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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.
Show the list of loadobjects with addresses.
Show current process ID (pid).
The prog command manages programs being debugged and their attributes. It has identical syntax and identical 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 (see run Command).
The quit command exits dbx. It has identical syntax and identical 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 (see 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 identical syntax and identical 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 [file_name ]
where:
file_name 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 on 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.
rtc showmap
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.
Since 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 such an error was not suppressed automatically.
Exclude the specified load objects from being instrumented.
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.
There is currently no way to redirect stderr using the run or runargs command.
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 (see 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 file_name.
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.
scopes
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. See check Command.
showblock -a address
where:
address is the address of a heap block.
The showleaks command is available only on Solaris platforms.
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 (see 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 (see 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 2 or the global value last given with the check command (see 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 file_name. $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. Such 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 given 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 given thread. Does not apply to step up.
Step the given 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 given, 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.
lwp_id is an LWP ID.
function is a function name.
Only when an explicit lwp_id is given, the deadlock avoidance measure of the generic step command is defeated.
When executing the step tocommand, 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 may not be taken due to a conditional branch. In a case where the call is not taken or there is no function call 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 given thread. Does not apply to step up.
Step the given 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 given signal.
Step the given LWP.
Step the LWP on which the given 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.
The following specific syntaxes are some of the more important syntaxes that are valid in native mode. For 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 Sun 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 also Setting a stop Breakpoint at a Line of Source Code.
Stop execution when the value of variable has changed.
Stop execution when the condition denoted by condition_expression evaluates to true.
Stop execution when function is called. See also Setting a stop 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.
Stop execution when any function in file_name is called.
C++ only: Set breakpoints on all non-member functions name.
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 also 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, use delete hid.
Hide the event from the status command. Some import modules may 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.
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 file_name.
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, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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.
file_name 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 can be used 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 also stopi Command for 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.
Stop execution when function is called.
where:
address 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 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 given by the ids, which can be obtained with unsuppress command (see unsuppress Command).
Remove all the unsuppress events as given by the unsuppress command (see 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:
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 on suppressing errors.
See the unsuppress Command for information on unsuppressing errors.
The sync command shows information about a given synchronization object. It is valid only in native mode.
The sync command is available only on Solaris platforms.
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 syncs command is available only on Solaris platforms.
syncs
The thread command lists or changes the current thread.
Display current thread.
Switch to thread thread_id.
In the following variations, a missing thread_id implies the current thread.
Print everything known about the given thread.
Hide the given (or current) thread. It will not show up in the generic threads listing.
Unhide the given (or current) thread.
Unhide all threads.
Keep the given 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 given thread blocking other threads.
Show which synchronization object the given 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, a missing thread_id implies the current thread.
Print everything known about the given thread.
Hide the given (or current) thread. It will not show up in the generic threads listing.
Unhide the given (or current) thread.
Unhide all threads.
Keep the given 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
wait
unknown
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
wait
unknown
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 (see joff Command) or prefix the tracecommand with native(see native Command).
If dbx is in JNI mode and you want to set a trace breakpoint in Java code, prefix the trace command with java (see java Command).
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 given file_name. To revert trace output to standard output use - for file_name. trace output is always appended to file_name. It is flushed whenever dbx prompts and when the application has exited. The file_name 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 given function.
Trace given source line..
Trace calls to and returns from the given function.
Trace calls to and returns from any function in file_name.
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:
file_name 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, use delete hid.
Hide the event from the status command. Some import modules may 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 given file_name. To revert trace output to standard output use - for file_nametrace output is always appended to file_name. It is flushed whenever dbxprompts and when the application has exited. The file_nameis always re-opened on a new run or resumption after an attach.
Trace line_number.
Trace give source file_name.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, using either the package path (using period (.) as a qualifier, for example, test1.extra.T1.Inner) or 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.
file_name 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 given function.
Trace the instruction at address.
Trace calls to and returns from the given 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:
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 current status of checking.
Turn off access checking.
Turn off leak checking.
Turn off memory use checking (leak checking is turned off as well).
Equivalent to uncheck -access; uncheck -memuse.
Equivalent to suppress all in functions files loadobjects.
where:
functions is one or more function names.
files is one or more file names.
loadobjects is one or more loadobject names
See check Command for information to turn on checking.
See suppress Command for information on suppressing of errors.
See Capabilities of Runtime Checking for an introduction to runtime checking.
The undisplay command undoes display commands.
Undo a display expression command.
Undo all the display commands numbered n, ...
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 all stack frame filters.
Delete stack frame filter regular_expression.
Delete stack frame filter number number.
where:
regular_expression is a regular expression.
number is the number of a stack frame filter.
The hide command (see Catch Floating Point Exceptions) 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 suppressandunsuppress 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 loadobject. Any other errors can be suppressed only by using the suppress command (see suppress Command) with the -d option.
Modify the default suppressions for all loadobjects by further unsuppressing errors.
Modify the default suppressions in the loadobjects 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 list of functions, list of files, and list of loadobjects.
Unsuppress errors at line.
Unsuppress errors at line in file.
Unsuppress errors at location address.
The unwatch command undoes a watch command. It is valid only in native mode.
Undo a watch expression command.
Undo the watch commands numbered n.
Undo all watch commands.
where:
expression is a valid expression.
The up command moves up the call stack (toward main). It has identical syntax and identical functionality in native mode and in Java mode.
Move up the call stack one level.
Move up the call stack number levels.
Move up the call stack, but don’t 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 on valid formats, see print Command.
In native mode, the whatis command prints the type of expression or declaration of type. 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.
Print the declaration of the type type.
Print the type of the expression expression.
where:
name is the name of a non-type.
type is the name of a type.
expression is a valid expression.
-d shows dynamic type instead of static type (C++ only).
-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 (C++ only).
-t displays the declaration of a type.
The whatis command, when run on a C++ class or structure, provides you with a list of all the defined member functions (undefined member functions are not listed), the static data members, the class friends, and the data members that are defined explicitly within that class.
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 (see joff Command) or prefix the when command with native (see native Command).
If dbx is in JNI mode and you want to set a when breakpoint in Java code, prefix the when command with java (see java Command).
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 file_name.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, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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.
file_name 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 executing commands on given low-level event.
The wheni command executes commands when a given low-level event occurs. It is valid only in native mode.
The wheni command has the following general syntax:
wheni event_specification [modifier]{command... ; }
When the specified event occurs, the commands are executed.
The following specific syntax is valid:
Execute command when address_expression 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.
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 (include function args and line info).
where:
number is a number of call stack frames.
Any of the above forms may 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 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.
Start traceback from frame number.
Quick trace back (only method names).
Verbose traceback (include 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 above, except that the current disassembled instruction is printed instead of the source line.
The whereis command prints all uses of a given 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 given name. It is valid only in native mode.
Print full qualification of name.
Print full qualification of type.
where:
name is the name of something 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.
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.