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_of_ commands argument, which it passes to the save portion of the command. By default, the value of -number is -1, so replay 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:


(dbx) replay

To replay the current debugging run and stop the run before the second to last command, use the dbx replay command where number is the number of commands back from the last debugging command:


(dbx) replay -number