Sun Studio 12: Debugging a Program With dbx

Saving and Restoring Using replay

The replay command is a combination command, equivalent to issuing a save -1 followed immediately by a restore. The replay command takes a negative number argument, which it passes to the save portion of the command. By default, the value of -number is -1, so the replay command works as an undo command, restoring the last run up until, but not including, the last command issued.

To replay the current debugging run, minus the last debugging command issued, type:

(dbx) replay

To replay the current debugging run and stop the run before a specific command, use the dbx replay command, where number is the number of commands back from the last debugging command.

(dbx) replay -number