Sun Studio 12 Update 1: Debugging a Program With dbx

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 may 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 may be -; dbx finds it using /proc.

debug -f ...

Force loading of a core file, even if it doesn’t 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 andundisplay 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 Sun Studio IDE.

debug -clone

Starts another dbx process debugging nothing. Valid only if running in the Sun 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.

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).