Many debugger commands, assertions, breakpoint commands, and so forth, are given with a list of other commands to perform at specific times. You can use C-style comments:
/* a C-style comment, between a forward_slash+asterisk and an asterisk+forward_slash. */ |
These lists may span several lines if they are surrounded by curly braces { }. If a list is not surrounded by curly braces, then it is read to the end of the line. Curly braces can contain other pairs of curly braces as long as they are all paired correctly. These lists may be any combination of debugger commands separated by semicolons ";". The syntax for expressions is the same as the C language, with a few exceptions. See "Evaluating expressions" for more information. For example, the following command checks the value of some global variables at a breakpoint:
{ "Global variable "; print /d fly; if var<9 {c} else {"error"} } |
This first prints "Global variable "
followed by "fly = "
with the value of the variable fly in decimal. If the value of variable fly is less than nine it continues to run. Otherwise, it prints "error"
.
Executing a command after a continue ({c}
) is not supported. For example, do not do this:
{ if (var < 10) {c;} print var } |