Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Debugging a Core File in the Same Operating Environment

To debug a core file, use the following command:

$ dbx program-name core

or

$ dbxtool program-name core

If you issue the following command, dbx determines the program name from the core file:

$ dbx - core

or

$ dbxtool - core

You can also debug a core file using the debug command when dbx is already running:

(dbx) debug -c core program-name

If you substitute - for the program name,dbx will attempt to extract the program name from the core file. dbx might not find the executable if its full path name is not available in the core file. If dbx does not find the executable, specify the complete path name of the binary when you tell dbx to load the core file.

If the core file is not in the current directory, you can specify its path name, for example, /tmp/core.

Use the where command to determine where the program was executing when it dumped core.

When you debug a core file, you can also evaluate variables and expressions to see the values they had at the time the program crashed, but you cannot evaluate expressions that make function calls. Although you cannot single step, you can set breakpoints and then rerun the program.