A P P E N D I X C |
Command Reference |
This appendix gives detailed syntax and functional descriptions of all of the dbx commands.
The adb command executes an adb-style command or sets adb mode. It is valid only in native mode.
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.
expression is the value to be assigned to variable.
assign identifier = expression
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.
process_id is the process ID of a running process.
program_name is the path name of the running program.
To attach to a running Java process:
1. Ensure that the JVM software can find libdbx_agent.so by adding libdbx_agent.so to your LD_LIBRARY_PATH. libdbx_agent.so:
The installation_directory is the location where the Sun Studio software is installed.
2. Start your Java application by typing:
java -Djava.compiler=NONE -Xdebug -Xnoagent -Xrundbx_agent myclass.class
3. Then you can attach to the process by starting dbx with the process id:
The bsearch command searches backward in the current source file. It is valid only in native mode.
In native mode, the call command calls a procedure. In Java mode, the call command calls a method.
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.
call [class_name.|object_name.]method_name([parameters])
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.
The catch command catches the given signal(s). 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.
Catch signal(s) named by signal. SIGKILL cannot be caught or ignored. |
|
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.
Note - The check command is available only on Solaris platforms. |
The features of runtime checking that are enabled by this command are reset to their initial state by the debug command.
Turn on access checking. RTC reports the following errors:
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 |
|
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. -match m is used for combining leaks; if the call stack at the time of allocation for two or more leaks matches n frames, then these leaks are reported in a single combined leak report.
The default value of n is 8 or the value of m (whichever is larger). Maximum value of n is 16. The default value of m is 3 for C++, and 2 otherwise.
check -memuse [-frames n] [-match m]
Turn on memory use (memuse) checking. check -memuse also implies check -leaks. In addition to a leak report at program exit, you also get a blocks in use (biu) report. 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. -match m 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 or 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
functions is one or more function names.
files is one or more file names.
loadobjects is one or more loadobject names
You can use this to focus runtime checking on places of interest.
The clear command clears breakpoints. It is valid only in native mode.
Event handlers created using the stop, trace, or when command with the inclass, inmethod, or infunction argument create sets of breakpoints. If the line you specify in the clear command matches one of these breakpoints, only that breakpoint is cleared. Once cleared in this manner an individual breakpoint belonging to a set cannot be enabled again. However, disabling and then enabling the relevant event handler will reestablish all the breakpoints.
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.
Note - The collector command is available only on Solaris platforms. |
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 hwprofile 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). |
||
Report the version of libcollector.so that would be used to collect data (see ). |
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.
The collector enable command enables the collector and opens a new experiment.
The collector heaptrace command specifies options for collecting heap tracing (memory allocation) data.
By default, heap tracing data is not collected. To collect this data, specify on. |
The collector hwprofile command specifies options for collecting hardware-counter overflow profiling data.
By default, hardware-counter overflow profile data is not collected. To collect this data, specify on. |
|
collector hwprofile counter name interval [ name2 interval2 ] |
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.
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 heaptrace 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).
The collector profile command specifies options for collecting profile data.
Specify profile timer period, fixed or floating point, with an optional trailing m for milliseconds or u for microseconds. |
The collector resume command causes the data collection to resume after a pause created by the collector pause command (see collector pause Command).
The collector sample command specifies the sampling mode and the sampling interval.
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.
The collector status command inquires about the status of the current experiment.
The collector store command specifies the directory and file name where an experiment is stored.
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. |
|
microseconds is the threshold below which synchronization wait events are discarded.
The collector version command reports the version of libcollector.so that would be used to collect data.
The cont command causes the process to continue execution. It has identical syntax and identical functionality in native mode and Java mode.
The dalias command defines a dbx-style (csh-style) alias. It is valid only in native mode.
Define name to be an alias for definition. definition may contain white space. A semicolon or newline terminates the definition. |
definition is the definition of an alias.
dbx accepts the following csh history substitution meta-syntax, which is commonly used in aliases:
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.
Debug process ID process_id; dbx finds the program via /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. |
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 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. |
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:
Preload the Runtime Checking library (see check Command). |
|
Add dir to pathmap set (see pathmap Command). |
|
Use file instead of /current_directory/.dbxrc or $HOME/.dbxrc as the startup file |
|
Suppress reading of initialization file /installation_directory/lib/dbxrc. |
|
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. |
|
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.
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 |
|
The -r option causes dbx to retain all display, trace, when, and stop commands. With no -r option, an implicit delete all and undisplay 0 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 under the dbx Debugger. |
|
Starts another dbx process debugging nothing. Valid only if running in the Sun Studio IDE. |
|
Start debugging program, even if program_name begins with a dash. |
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).
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.
Add directory_name to pathmap set (see pathmap Command). |
|
Use file instead of /current_directory/.dbxrc or $HOME/.dbxrc as the startup file |
|
Suppress reading of initialization file /installation_directory/lib/dbxrc. |
|
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.
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 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. |
signal is the name of a signal.
The dis command disassembles machine instructions. It is valid only in native mode.
Disassemble count instructions (default is 10), starting at address address. |
|
Disassemble 10 instructions, starting at the value of + (see examine Command). |
|
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.
In native mode, the display command evaluates and prints expressions at every stopping point. In Java mode, the display command evaluates and prints expressions, local variables, or parameters at every stopping point. Object references are expanded to one level and arrays are printed itemwise.
Display the value of expressions expression, ... at every stopping point. |
|
display [-r|+r|-d|+d|-p|+p|-L|-fformat|-Fformat|--] expression,... |
See the print Command for the meaning of these flags. |
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.
Display the value of variables and parameters identifier, ... at every stopping point. |
|
See the print Command for the meaning of these flags. |
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.
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.
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.
filename 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.
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:
The exception command prints the value of the current C++ exception. It is valid only in native mode.
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. |
The file command lists or changes the current file. It has identical syntax and identical functionality in native mode and in Java mode.
filename is the name of a file.
In native mode, the files command lists file names that match a regular expression. In Java mode, the files command lists all of the Java source files known to dbx. If your Java source files are not in the same directory as the .class or .jar files, dbx might not find them unless you have set the $JAVASRCPATH environment variable (see Specifying the Location of Your Java Source Files).
regular_expression is a regular expression.
(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.
The fixed command lists the names of all fixed files. It is valid only in native mode.
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.
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.
Change the current function to the function or procedure procedure. |
procedure is the name of a function or procedure.
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.
filename is the name of the file for which you wish to list all the functions.
regular_expression is the regular expression for which you wish to list all the matching functions.
(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.
The following gdb commands are not supported in this release:
The handler command modifies event handlers (enable, disable, etc.). It has identical syntax and identical functionality in native mode and in Java mode.
A handler is created for each event that needs to be managed in a debugging session. The commands trace, stop, and when create handlers. Each of these commands returns a number known as the handler ID (handler_id). The handler, status, and delete commands manipulate or provide information about handlers in a generic fashion.
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.
Hide stack frames matching regular_expression. The regular expression matches either the function name, or the name of the loadobject, and is a sh or ksh file matching style regular expression. |
regular_expression is a regular expression.
The ignore command tells the dbx process not to catch the given signal(s). It is valid only in native mode.
Ignoring a signal causes dbx not to stop when the process receives that kind of signal.
Ignore signal(s) named by signal. SIGKILL cannot be caught or ignored. |
|
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.
pathname is the pathname 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.
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.
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.
The joff command switches dbx from Java mode or JNI mode to native mode.
The jon command switches dbx from native mode to Java mode.
The jpkgs command prints the names of all Java packages known to dbx 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.
The kill command sends a signal to a process. It is valid only in native mode.
job may be a process ID or may be specified in any of the following ways:
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. |
language is c, c++, fortran, or fortran90.
The line command lists or change the current line number. It has identical syntax and identical functionality in native mode and in Java mode.
filename 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 the start of the source for function. list function changes the current scope. See Program Scope for more information. |
|
List file filename from line n. Where appropriate, the line number may be `$' which denotes the last line of the file. Comma is optional. |
filename is the file name of a source code file.
function is the name of a function to display.
number is the number of a line in the source file.
n is a number of lines to display.
n1 is the number of the first line to display.
n2 is the number of the last line to display.
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. |
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 loadobjects. It is valid only in native mode.
Show currently loaded loadobjects (see loadobject -list Command) |
||
Load symbols for specified loadobject (see loadobject -load Command) |
||
Remove loadobject from dbx's search algorithm (see loadobject -hide Command) |
||
Add loadobject to dbx's search algorithm (see loadobject -use Command) |
||
Show various ELF details of the loadobject (see loadobject -dumpelf Command) |
||
Don't automatically load loadobjects matching ex-regexp (see loadobject -exclude Command) |
||
Show list of exclude patterns (see loadobject -exclude Command) |
||
Clear the 'exclude' list of patterns (see loadobject -exclude Command) |
regexp is a regular expression. If it is not specified the command applies to all loadobjects.
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 loadobject. It is valid only in native mode.
loadobject -dumpelf [ regexp ]
regexp is a regular expression. If it is not specified the command applies to all loadobjects.
This command dumps out information related to the ELF structure of the loadobject 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 loadobjects matching the specified regular expression.
loadobject -exclude ex-regexp [ -clear ]
ex-regexp is a regular expression.
This command prevents dbx from automatically loading symbols for loadobjects 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.
regexp is a regular expression. If it is not specified the command applies to all loadobjects.
This command removes a loadobject 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]
regexp is a regular expression. If it is not specified the command applies to all loadobjects.
The full path name for each loadobject is shown along with letters in the margin to show status. Loadobjects that are hidden are listed only if you specify the -a option.
(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 dbx commands, see the `lo -use' command below.
The loadobject -load command loads symbols for specified loadobjects. It is valid only in native mode.
loadobject -list [ regexp ] [ -a]
loadobject can be a full path name or a library in /usr/lib or /usr/lib/sparcv9. If there is a program being debugged, then only the proper ABI library directory will be searched.
The loadobject -unload command unloads specified loadobjects. It is valid only in native mode.
regexp is a regular expression. If it is not specified the command applies to all loadobjects.
This command unloads the symbols for any loadobjects 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 loadobjects that might be currently in use, or critical to the proper functioning of dbx.
The loadobject -use command adds loadobjects from dbx's search algorithm. It is valid only in native mode.
regexp is a regular expression. If it is not specified the command applies to all loadobjects.
The lwp command lists or changes the current LWP (lightweight process). It is valid only in native mode.
Note - The lwp command is available only on Solaris platforms. |
Displays the name, home, and masked signals of the current lwp. |
lwp_id is the identifier of a lightweight process.
The lwps command lists all LWPs (lightweight processes) in the process. It is valid only in native mode.
Note - The lwps command is available only on Solaris platforms. |
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. |
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.
The module command reads debugging information for one or more modules. It is valid only in native mode.
name is the name of a module for which to read debugging information.
-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, etc.
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 modules command lists module names. It is valid only in native mode.
List names of modules containing debugging information that have been read in already. |
-v specifies verbose mode, which prints language, file names, etc.
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.
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.
n is the number of lines to step.
signal is the name of a signal.
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.
Note - For information on lightweight processes (LWPs), see the Solaris Multithreaded Programming Guide. |
n is the number of lines to step.
thread_id is a thread identifier.
When an explicit thread_id or lwpid is given, the deadlock avoidance measure of the generic next command is defeated.
Note - For information on lightweight processes (LWPs), see the Solaris Multithreaded Programming Guide.threaded Programming Guide. |
The nexti command steps one machine instruction (stepping over calls). It is valid only in native mode.
Step the LWP on which the given thread is active. Will not implicitly resume all LWPs when stepping over a function. |
n is the number of instructions to step.
signal is the name of a signal.
The pathmap command maps one path name to another for finding source files, etc. 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.
from and to are filepath prefixes. from refers to the filepath compiled into the executable or objectfile 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).
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 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). |
|
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. |
|
(`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 (see Program Scope for scope resolution rules. |
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:
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 %>
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 |
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.
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.
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 > 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.
The regs command prints the current value of registers. It is valid only in native mode.
-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. |
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 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.
filename is the name of the file to which the dbx commands executed since the last run, rerun, or debug command were saved.
The rprint command prints an expression using shell quoting rules. It is valid only in native mode.
rprint [-r|+r|-d|+d|-p|+p|-L|-l|-fformat|-Fformat|--] expression |
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). |
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.
Note - The rtc -showmap command is available only on Solaris platforms. |
This command is intended for expert users, and internal debugging of dbx. 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. See Runtime Checking's 8 Megabyte Limit for details.
The run command runs the program with arguments.
Use Control-C to stop executing the program.
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.
Note - There is currently no way to redirect stderr using the run or runargs command. |
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). |
|
arguments are the arguments to be used in running the target process.
file is the file to which output from the target process or input to the target process is to be redirected.
The save command saves commands to a file. It is valid only in native mode.
Save all or all minus number commands since last run command, rerun command, or debug command to the default file or filename. |
number is the number of commands not to save.
filename is the name of the file to save the dbx commands executed since the last run, rerun, or debug command.
The scopes command prints a list of active scopes. It is valid only in native mode.
The search command searches forward in the current source file. It is valid only in native mode
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.
Note - The showblock command is available only on Solaris platforms. |
When memory use checking or memory leak 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.
address is the address of a heap block.
The showleaks command reports new memory leaks since last showleaks command. It is valid only in native mode.
Note - 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]
-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.
The showmemuse command shows memory used since last showmemuse command. It is valid only in native mode.
Note - The showmemuse command is available only on Solaris platforms. |
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]
-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.
The status command lists event handlers (breakpoints, etc.). It has identical syntax and identical functionality in native mode and Java mode.
Print trace, when, and stop breakpoints in effect including the hidden ones. |
|
handler_id is the identifier of an event handler.
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 linestepping.
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.
n is the number of lines to step.
signal is the name of a signal.
Only when an explicit lwp_id is given, the deadlock avoidance measure of the generic step command is defeated.
When executing the step to command, while an attempt is made to step into the last assemble 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.
The stepi command steps one machine instruction (stepping into calls). It is valid only in native mode.
n is the number of instructions to step.
signal is the name of a signal.
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 access mode address_expression [ ,byte_size_expression ] |
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 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. -norecurese is the default. If -recurse is specified, the base classes are included. See also Setting Breakpoints in Member Functions of the Same Class. |
|
C++ only: set breakpoints on all member functions name. See Setting Breakpoints in Member Functions of Different Classes. |
|
C++ only: set breakpoint on entry into any non-static method of the class and all its base classes when called from the object object_expression. -recurse is the default. If -norecurse is specified, the base classes are not included. See 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:
mode can also contain the following:
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 following specific syntaxes are valid in Java mode.
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:
mode can also contain the following:
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:
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:
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.
Note - The suppress command is available only on Solaris platforms. |
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 loadobject. These errors can be unsuppressed only by using the unsuppress with the -d option. |
|
Modify the default suppressions for all loadobjects by further suppressing errors. |
|
Modify the default suppressions in the loadobjects by further suppressing errors. |
|
Set the default suppression to the original value (startup time) |
|
Remove the unsuppress events as given by the id(s) (id(s) 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 in list of functions, list of files, and list of loadobjects. |
|
errors are blank separated and can be any combination of:
Block in use (allocated memory). Though not an error, you can use biu just like errors in the suppress commands. |
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.
loadobjects is one or more loadobject 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.
Note - The sync command is available only on Solaris platforms. |
Show information about the synchronization object at address. |
address is the address of the synchronization object.
The syncs command lists all synchronization objects (locks). It is valid only in native mode.
Note - The syncs command is available only on Solaris platforms. |
The thread command lists or changes the current thread.
In the following variations, a missing thread_id implies the current thread.
In the following variations, a missing thread_id implies the current thread.
Hide the given (or current) thread. It will not show up in the generic threads listing. |
|
Keep the given thread from ever running. A suspended thread shows up with an "S" in the threads list. |
|
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.
Each line of information is composed of the following:
An `o' instead of an asterisk indicates that a dbx internal event has occurred.
Controls whether all threads are printed or threads are filtered. The default is to filter threads. |
|
Under the dbx Debugger, enables automatic updating of the thread listing. |
|
Each line of information in the listing is composed of the following:
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 trace command 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:
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.
variable is the name of a variable.
The following modifiers are valid in native mode.
The following specific syntaxes are valid in Java mode.
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.
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.
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.
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.
Note - The uncheck command is available only on Solaris platforms. |
Turn off memuse checking (leak checking is turned off as well). |
|
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.
expression is a valid expression.
Undo a display expression, ... or display identifier, ... command. |
|
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.
regular_expression is a regular expression.
number is the number of a stack frame filter.
The hide command (see hide Command) lists the filters with numbers.
The unintercept command undoes intercept commands (C++ only). It is valid only in native mode.
unintercept intercepted_typename
|
Delete throws of type intercepted_typename from the intercept list. |
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.
Note - The unsuppress command is available only on Solaris platforms. |
History of suppress and unsuppress commands (not those specifying the -d and -reset options) |
|
List of errors being unsuppressed in functions that are not compiled for debugging. This list is per 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. |
|
Set the default suppression mask to the original value (startup time). |
|
Suppress errors in list of functions, list of files, and list of loadobjects. |
|
The up command moves up the call stack (toward main). It has identical syntax and identical functionality in native mode and in Java mode.
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.
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.
name is the name of a non-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:
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 specific syntaxes are valid in native mode:
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(s) 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:
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.
number is a number of call stack frames.
Any of the above forms may be followed by a thread or LWP ID to obtain the traceback for the specified entity.
Verbose traceback (include method arguments and line information). |
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.
The whereis command prints all uses of a given name, or symbolic name of an address. It is valid only in native mode.
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.
name is the name of something that is in scope; for example, a variable, function, class template, or function template.
-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.
type is the type of an exception.
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.