| |||
| Home > Debugging with Command Scripts > About debugging with command scripts > Command scripts | |||
You can create command scripts in the following ways:
Manually, using a text editor.
By opening a log file during a debugging session.
You can also create a command script from a journal file. However, you must edit the contents of the file to make sure any lines that do not contain CLI commands are commented out or removed.
You can use comments in your command scripts. Any characters identified as belonging to a comment are ignored by RealView Debugger. The following rules apply to comments in command scripts:
C style comments begin with a slash followed by
an asterisk (/*) and end with an asterisk followed
by a slash (*/). Also the comment text and the
delimiters must be on a single line:
valid comment
/* comment */
These comments appear in log and journal files.
invalid comment
/* another comment */
C++ style comments begin with two slashes (//)
and end when the end of the line is reached, for example:
// This is a line comment // Copyright (c) ARM Limited
Comments that begin with //,
but are not placed after a command, do not appear in any log and
journal files.
Comments can begin with a semicolon (;),
for example:
; A comment
Comments can begin with //# and
end when the end of the line is reached.
Comments that begin with //#,
but are not placed after a command, appear only in a journal file.
Also, the //# prefix is replaced with ; in
the that file.
Only // or //# comments
can be placed at the end of a command, for example:
ADD int value // integer value
Comments cannot be nested.