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