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

Exit Print View

Updated: June 2017
 
 

debug Command

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.

Native Mode Syntax

debug

Print the name and arguments of the program being debugged.

debug program-name

Begin debugging program-name with no process or core.

debug -c core program-name

Begin debugging program-name with core file core.

debug -p process-ID program-name

Begin debugging program-name with process ID process-ID.

debug program-name core

Begin debugging program with core file core. program-name can be -. dbx will attempt to extract the name of the executable from the core file. For details, see Debugging a Core File.

debug program-name process-ID

Begin debugging program-name with process ID process-ID. program-name can be -; dbx finds it using /proc.

debug -f ...

Force loading of a core file, even if it does not match.

debug -r ...

The –r option causes dbx to retain all display, trace, when, and stop commands. With no –r option, an implicit delete all and undisplay O are performed.

debug -clone ...

The –clone option causes another dbx process to begin execution, permitting debugging of more than one process at a time. Valid only if running in the Oracle Developer Studio IDE.

debug -clone

Starts another dbx process debugging nothing. Valid only if running in the Oracle Developer Studio IDE.

debug [options] -- program-name

Start debugging program-name even if program-name begins with a dash.

where:

core is the name of a core file.

options are the options listed inOptions.

process-ID is the process ID of a running process.

program-name is the path name of the program.

Leaks checking and access checking are disabled when a program is loaded with the debug command. You can enable them with the check command.

Java Mode Syntax

debug

Print the name and arguments of the program being debugged.

debug program-name [.class | .jar]

Begin debugging program-name with no process.

debug -p process-ID program-name [.class | .jar]

Begin debugging program-name with process ID process-ID.

debug program-name [.class | .jar] process-ID

Begin debugging program-name with process ID process-ID. program-name can be -; dbx finds it using /proc.

debug -r

The -r option causes dbx to retain all watch commands, display commands, trace commands, when commands, and stop commands. With no -r option, an implicit delete all command and undisplay 0 command are performed.

debug -clone ...

The -clone option causes another dbx process to begin execution, permitting debugging of more than one process at a time. Valid only if running in the Oracle Developer Studio IDE.

debug -clone

Starts another dbx process debugging nothing. Valid only if running in the Oracle Developer Studio IDE.

debug [options] -- program-name{.class | .jar}

Start debugging program-name even if program-name begins with a dash.

where:

options are the options listed inOptions.

process-ID is the process ID of a running process.

program-name is the path name of the program.

Options

–c commands

Execute commands before prompting for input.

–d

Used with –s, removes

–e

Echo input commands.

–I directory_name

Add directory_name 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, then exit.

–R

Print the readme file for dbx.

–s file

Use file instead of current_directory/.dbxrc or $HOME/.dbxrc as the startup file

–S

Suppress reading of initialization file /install-dir/lib/dbxrc.

–V

Print the version of dbx.

–w n

Skip n frames on where command.

–-

Marks the end of the option list; use this if the program name starts with a dash.