Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Using the save Command

The save command saves to a file all debugging commands issued from the last run command, rerun command, or debug command up to the save command. This segment of a debugging session is called a debugging run.

In addition to the list of debugging commands issued, the save command saves debugging information associated with the state of the program at the start of the run: breakpoints, display lists, and the like. When you restore a saved run, dbx uses the information in the save-file.

You can save part of a debugging run; that is, the whole run minus a specified number of commands from the last one entered.

image:Diagram showing saving of a complete run with a save command and a run minus the             last two steps with a save ???2 command

If you are not sure where you want to end the run you are saving, use the history command to see a list of the debugging commands issued since the beginning of the session.


Note -  By default, the save command writes information to a special file. If you want to save a debugging run to a file you can restore later, you can specify a file name with the save command. See Saving a Series of Debugging Runs as Checkpoints.

Issue the save command at the point at which you want to save an entire debugging.

(dbx) save

To save part of a debugging run, include the number option, where number is the number of commands back from the save command that you do not want saved.

(dbx) save -number