Sun Studio 12 Update 1: Debugging a Program With dbx

dbx Command

The dbx command starts dbx.

Native Mode Syntax

dbx options program_name

Debug program_name.

dbx options program_name core

Debug program_name with corefile core.

dbx options program_name process_id

Debug program_name with process ID process_id.

dbx options - process_id

Debug process ID process_id; dbx finds the program using /proc.

dbx options - core

Debug using corefile core; see also debug Command.

dbx options -r program_name arguments

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.

Java Mode Syntax

dbx options program_name{.class | .jar}

Debug program_name.

dbx options program_name{.class | .jar} process_id

Debug program_name with process ID process_id.

dbx options - process_id

Debug process ID process_id; dbx finds the program using /proc.

dbx options -r program_name{.class | .jar} arguments

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.

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.