Writes out commands to reset all currently set breakpoints, watchpoints, and/or macros to a specified file.
SAVE [{/BREAKPOINT |/WATCH |/MACRO}…|/ALL] filename
where:
In this example, two debugging sessions are used to demonstrate the SAVE command. In the first session, macros, breakpoints, and watchpoints are saved in the dbg file; in the second session, the saved commands are read from the dbg file.
Session one:
$ cwcmd primes CodeWatch setting up "primes". Wait... CodeWatch> BREAKPOINT PRIMES\114 CodeWatch> BREAKPOINT PRIMES\119 CodeWatch> BREAKPOINT PRIMES.READ_INPUT\%ENTRY [E maxv;] CodeWatch> BREAKPOINT PRIMES.ISPRIME\%ENTRY CodeWatch> WATCH N /ACTION [C;] CodeWatch> MACRO fig = [FIND /IGNORE] CodeWatch> MACRO info=[ LB /A;LENV;LMA /A; WHERE ] CodeWatch> SAVE dbg Environment saved to file "dbg" CodeWatch> QUIT
Session two:
$ cwcmd primes CodeWatch setting up "primes". Wait... CodeWatch> READ dbg **** Reading commands from "dbg" ... CodeWatch> BREAKPOINT PRIMES\114 /SKIP=0 CodeWatch> BREAKPOINT PRIMES\119 /SKIP=0 CodeWatch> BREAKPOINT PRIMES.READ_INPUT\%ENTRY /SKIP=0 [E maxv;] CodeWatch> BREAKPOINT PRIMES.ISPRIME\%ENTRY /SKIP=0 CodeWatch> WATCH N /ACTION [C;] CodeWatch> MACRO fig = [FIND /IGNORE] CodeWatch> MACRO info = [ LB /A;LENV;LMA /A; WHERE ] CodeWatch> **** Done reading commands from "dbg"
Description
The SAVE command writes out commands to a specified disk file to reset all current breakpoint, watchpoint, and/or macro settings for use in a later debugging session. The file can be read in by using the READ command.
If no options or the All option is specified, commands to reproduce all breakpoint, watchpoint, and macro settings will be written to the specified file.
If the Breakpoint option is specified, the breakpoint commands for all current breakpoint settings will be written to the specified file. If the Watch option is specified, the watchpoint commands for all current watchpoint settings will be written to the specified file. If the Macro option is specified, the macro commands for all current macros will be written to the specified file. Any combination of Breakpoint, Watch, and Macro may be used.
The SAVE command will create, not append, the specified file. If the file already exists, the Save will fail and an error will be issued. For more information, see the section Read.