The Cmajor debugger, cmdb, is a command-line debugger for Windows, Linux and Windows subsystem for Linux. It is integrated in Cmajor Code, a graphical editor and development environment written in Cmajor. The cmdb reads a debugging information file that is generated by the Cmajor compiler with C++ backend, cppcmc. The debug information file contains line number information and information about types and variables of a Cmajor program. The cmdb uses it to drive the GNU debugger GDB.
Long option | Short option | Description |
---|---|---|
--help | -h | Print help and exit. |
--verbose | -v | Be verbose. |
--debug | -d | Debug the debugger. |
--dontBreakOnThrow | -t | Set breakOnThrow to off. By default it is on. |
‑‑sessionPort=PORT_NUBER | ‑s=PORT_NUMBER | Set the port number of the CMDB session that cmdb and the program being debugged will use for exchanging console I/O messages. Default port number is 54322. |
The list command shows source file content starting from the specified list location. If no source file path is given, shows contents of current source file starting from the specified line number. If source file path is given, but no line number is given, starts from the line number 1. If '*' is specified as the list location, lists around the instruction to where the process is currently stopped. If the list command is given without a list location, lists starting from the succeeding line of the last line of the previous list command.
A source location can contain a bare file name, a bare line number, a file name and a source line number, the name of a project followed by a slash and a file name and an optional source line number, an absolute or relative source file path followed by an optional source line number, or drive letter followed by a colon and an absolute source file path followed by an optional source line number.
A source file path consists of path components separated by the slash character. A path component can contain alphanumeric characters, and plus, minus, period and underscore characters. A path component has to start with a letter, underscore, plus, or period character.
If more than one source file matches the given source location expression, the debugger asks to disambiguate the source location for example using project name slash prefix.
list‑command | → | (list | l) list‑location? |
list‑location | → | source‑location | * |
source‑location | → | path (: line)? | line |
path | → | (drive :)? (/? (comp /)*)? comp |
drive | → | [A-Za-z] |
comp | → | [A-Za-z_.+][a-zA-Z_0-9.+-]* |
line | → | integer |
integer | → | [0-9]+ |
list Main.cm:10Lists Main.cm source file starting from the line 10.
list Calculator/Parser.cmLists Parser.cm source file of the Calculator project starting from line 1.
list projects/examples/Calculator/Scanner.cm:1Lists Scanner.cm source file starting from line 1.
list 10Lists starting from the line 10 of the current source file.
listLists starting from the following line where the previous list command ended.
list foo.cmIf source file foo.cm does not exist, the result is the following error JSON object:
{ "error" : "no source file path matched location 'foo.cm:1'", "success" : false }
If the list command succeeds, the result is 11 lines of source code. If the list command fails, the result is an error result.
The break command sets a breakpoint to a source location. What have been said about source location expressions in the list command case excluding the * source location expression applies to the break command as well. A successful break command sets the current source file path to file path of the source location.
break‑command | → | (break | b) source‑location |
break Calculator/Parser.cm:43Result:
{ "breakpoint" : { "id" : "1" "location" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Parser.cm", "func" : "Calculator.Parse(const String&)", "line" : "43" } , "numInsts" : "1", } , "success" : true }
break 44Result:
{ "breakpoint" : { "id" : "2" "location" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Parser.cm", "func" : "Calculator.Parse(const String&)", "line" : "44" } , "numInsts" : "1", } , "success" : true }
break foo.cm:10If source file foo.cm does not exist, result is the following error JSON object:
{ "error" : "no source file path matched location 'foo.cm:10'", "success" : false }
If the break command succeeds, the debugger prints a JSON object describing the created breakpoint. This JSON object has the following fields:
If the break command fails, the debugger prints an error result.
The delete command deletes a breakpoint.
delete‑command | → | (delete | d) breakpoint-id |
breakpoint‑id | → | integer |
delete 1Result:
{ "success" : true }
d 2Result:
{ "success" : true }
delete 3If breakpoint 3 does not exist, result is the following error JSON object:
{ "error" : "error: breakpoint 3 not found", "success" : false }
If the delete command succeeds, the debugger prints a JSON object with the following field:
If the delete command fails, the debugger prints an error result.
The show breakpoint command shows information about a breakpoint given a breakpoint identifier.
show‑breakpoint‑command | → | show breakpoint breakpoint-id |
show breakpoint 1Result:
{ "breakpoint" : { "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Parser.cm", "func" : "Calculator.Parse(const String&)", "line" : "43" } , "id" : "1" } , "success" : true }
show breakpoint 3If breakpoint 3 does not exist, result is the following JSON object:
{ "error" : "breakpoint id '3' not found", "success" : false }
If the show breakpoint command succeeds, the debugger prints a JSON object with the following fields:
If the show breakpoint command fails, the debugger prints an error result.
The show breakpoints command lists current breakpoints.
show‑breakpoints‑command | → | show breakpoints |
show breakpointsResult:
{ "breakpoints" : [ { "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Parser.cm", "func" : "Calculator.Parse(const String&)", "line" : "43" } , "id" : "1" } , { "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Parser.cm", "func" : "Calculator.Parse(const String &)", "line" : "44" } , "id" : "2" } ] , "success" : true }
If the show breakpoints command succeeds, the debugger prints a JSON object that contains a JSON array of breakpoints. This JSON object has the following fields:
If the show breakpoints command fails, the debugger prints an error result.
The next command executes current source line of the program being debugged, transfers control to the next source line and stops the process. Any intervening function calls are stepped over. The process may hit a breakpoint before control reaches the next source line, in which case the debugger stops execution of the process. After execution the debugger prints a JSON object describing current state of the process and lists source lines around the current instruction.
next‑command | → | next | n |
nextResult:
{ "stopped" : { "cppFrame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/lib\/cpp\/gcc\/debug\/Main.cpp", "func" : "function_main_99F3726C50455B4187460FBE611E3885299323E1", "line" : "3732" } , "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Main.cm", "func" : "main()", "line" : "30" } , "reason" : "end-stepping-range", "threadId" : "1" } , "success" : true }
nResult:
{ "stopped" : { "cppFrame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/lib\/cpp\/gcc\/debug\/Main.cpp", "func" : "function_main_99F3726C50455B4187460FBE611E3885299323E1", "line" : "3753" } , "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Calculator\/Main.cm", "func" : "main()", "line" : "31" } , "reason" : "end-stepping-range", "threadId" : "1" } , "success" : true }
nextIf the process exits and returns a zero exit code, the result is as follows:
{ "stopped" : { "reason" : "exited-normally" } , "success" : true }
nextIf the process exits and returns a non-zero exit code, the result is as follows:
{ "stopped" : { "exitCode" : "01", "reason" : "exited" } , "success" : true }
If the next command succceeds, the debugger prints a stopped result, a JSON object that describes the current state of the process. The reason field of the stopped result may contain for example string end-stepping-range or breakpoint-hit.
If the next command fails, the debugger prints an error result.
The step command starts executing current source line of the program being debugged. If no function call is encountered, the debugger transfers control to the next source line and stops the process. If a function call is encountered, the debugger steps inside that function and stops the process. After execution the debugger prints a JSON object describing the current state of the process and lists source lines around the current instruction.
step‑command | → | step | s |
stepResult:
{ "stopped" : { "cppFrame" : { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/lib\/cpp\/gcc\/debug\/Console.cpp", "func" : "member_function_WriteLine_Console_9FE02332C7669B128638EA7B0A2A2EE07C3A0A17", "line" : "6794" } , "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/Console.cm", "func" : "System.Console.WriteLine(const char*)", "line" : "99" } , "reason" : "end-stepping-range", "threadId" : "1" } , "success" : true }
If the step command succceeds, the debugger prints a stopped result, a JSON object that describes the current state of the process. The reason field of the stopped result will most likely contain a string end-stepping-range.
If the step command fails, the debugger prints an error result.
The finish command runs the program to the end of the current function and steps out of the function. The process may hit a breakpoint before that point, in which case the debugger stops execution of the process. After execution the debugger prints a JSON object describing current state of the process and lists source lines around the current instruction.
finish‑command | → | finish | f |
finishResult:
{ "stopped" : { "cppFrame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/lib\/cpp\/gcc\/debug\/Hello.cpp", "func" : "function_main_99F3726C50455B4187460FBE611E3885299323E1", "line" : "641" } , "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/Hello.cm", "func" : "main()", "line" : "6" } , "reason" : "function-finished", "threadId" : "1" } , "success" : true }
If the finish command succceeds, the debugger prints a stopped result, a JSON object that describes the current state of the process. The reason field of the stopped result may contain for example function-finished or breakpoint-hit.
If the finish command fails, the debugger prints an error result.
The until command runs the program to the specified source location.
until‑command | → | (until | u) source‑location |
until 5Result:
{ "stopped" : { "cppFrame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/lib\/cpp\/gcc\/debug\/Hello.cpp", "func" : "function_main_99F3726C50455B4187460FBE611E3885299323E1", "line" : "637" } , "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/Hello.cm", "func" : "main()", "line" : "5" } , "reason" : "location-reached", "threadId" : "1" } , "success" : true }
If the until command succceeds, the debugger prints a stopped result, a JSON object that describes the current state of the process. The reason field of the stopped result may contain for example location-reached or breakpoint-hit.
If the until command fails, the debugger prints an error result.
The continue command starts executing the program being debugged from the current source line, and runs it until a breakpoint is hit, the process receives a signal, or the process exits gracefully or not so gracefully.
continue‑command | → | continue | c |
continueResult:
{ "stopped" : { "reason" : "exited-normally" } , "success" : true }
cResult:
{ "stopped" : { "breakpointId" : "1", "cppFrame" : { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/lib\/cpp\/gcc\/debug\/Console.cpp", "func" : "member_function_WriteLine_Console_9FE02332C7669B128638EA7B0A2A2EE07C3A0A17", "line" : "6838" } , "frame" : { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/Console.cm", "func" : "System.Console.WriteLine(const char*)", "line" : "100" } , "gdbBreakpointNumber" : "2", "reason" : "breakpoint-hit", "threadId" : "1" } , "success" : true }
If the continue command succceeds, the debugger prints a stopped result, a JSON object that describes the current state of the process. The reason field of the stopped result may contain for example exited-normally, exited, breakpoint-hit or signal-received.
If the continue command fails, the debugger prints an error result.
The depth command prints a JSON object that contains the depth of the current call stack.
depth‑command | → | depth |
depthResult:
{ "depth" : "4", "success" : true }
If the depth command succeeds, the debugger prints a JSON object that contains the depth of the call stack. The JSON object contains the following fields:
If the depth command fails, the debugger prints an error result.
The frames command prints a JSON object that contains specified frames of the current call stack. If no frame numbers are given, the debugger prints entire call stack. The number of the current frame is zero and outer frames have succeeding numbers.
frames‑command | → | frames (low‑frame‑number high‑frame‑number)? |
low‑frame‑number | → | integer |
high‑frame‑number | → | integer |
framesResult:
{ "cppFrames" : [ { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/lib\/cpp\/gcc\/debug\/BinaryReader.cpp", "func" : "constructor_String_char_1A2E459753926DA4BB6C50F78EAA85228F458D8D", "level" : "0", "line" : "1096" } , { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/lib\/cpp\/gcc\/debug\/Console.cpp", "func" : "member_function_WriteLine_Console_9FE02332C7669B128638EA7B0A2A2EE07C3A0A17", "level" : "1", "line" : "6860" } , { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/lib\/cpp\/gcc\/debug\/Hello.cpp", "func" : "function_main_99F3726C50455B4187460FBE611E3885299323E1", "level" : "2", "line" : "639" } , { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/lib\/cpp\/gcc\/debug\/__main__.cpp", "func" : "main", "level" : "3", "line" : "1319" } ] , "frames" : [ { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/String.cm", "func" : "String.@constructor(String , const char*)", "level" : "0", "line" : "38" } , { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/Console.cm", "func" : "System.Console.WriteLine(const char*)", "level" : "1", "line" : "100" } , { "file" : "D:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/Hello.cm", "func" : "main()", "level" : "2", "line" : "5" } , { "level" : "3" } ] , "success" : true }
frames 0 0Result:
{ "cppFrames" : [ { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/lib\/cpp\/gcc\/debug\/BinaryReader.cpp", "func" : "constructor_String_char_1A2E459753926DA4BB6C50F78EAA85228F458D8D", "level" : "0", "line" : "1096" } ] , "frames" : [ { "file" : "D:\/work\/cmajorm\/cmajor\/system\/System.Base\/String.cm", "func" : "String.@constructor(String , const char*)", "level" : "0", "line" : "38" } ] , "success" : true }
If the frames command succeeds, the debugger prints a JSON object that contains two JSON arrays of frame objects, one for C++ frames and one for Cmajor frames:
If the frames command fails, the debugger prints an error result.
The print command evaluates an expression and prints the result as a JSON object. The expression can contain for example a name of a local variable, this pointer, subscript or range expression, pointer dereference, member selection or address-of expression.
print‑command | → | (print | p) expression |
expression | → | additive‑expression |
additive‑expression | → | prefix‑expression ((+ | -) prefix‑expression)* |
prefix‑expression | → | dereference‑expression | address‑of‑expression | postfix‑expression |
dereference‑expression | → | * prefix‑expression | |
address‑of‑expression | → | & prefix‑expression | |
postfix‑expression | → |
primary‑expression ( member‑selection‑expression | base‑selection‑expression | subscript‑expression | range‑expression )* |
member‑selection‑expression | → | . identifier |
base‑selection‑expression | → | . base |
subscript‑expression | → | [ expression ] |
range‑expression | → | [ expression , expression ] |
primary‑expression | → |
identifier | this | integer | parenthesized‑expression | typeid‑expression | cast‑expression | |
identifier | → | [a-zA-Z_][a-zA-Z0-9_]* |
parenthesized‑expression | → | ( expression ) |
typeid‑expression | → | typeid ( string ) |
string | → | " ([^\n\r"]| escape )* " |
escape | → | \ ((x | X) hex‑digits | (d | D) integer | octal‑digits | u hex‑4 | U hex‑8 | [abfnrtv\"'\\]) |
hex‑digits | → | hex‑digit+ |
hex‑4 | → | hex‑digit hex‑digit hex‑digit hex‑digit |
hex‑8 | → | hex‑4 hex‑4 |
hex‑digit | → | [0-9a-fA-F] |
octal‑digits | → | [0-7]+ |
cast‑expression | → | cast < typeid‑expression > ( expression ) |
Additive expressions are of the form ptr+offset, offset+ptr, ptr-offset and ptr-ptr, where ptr is a pointer, e.g. a local variable or other expression of a pointer type, and offset is an integer.
Additive expressions may not have direct uses for debugger users, but cmdb uses it internally to translate a subscript expression regarding to a List container to dereference and an additive pointer expression. For example, if intList is a variable of type List<int>, cmdb does the following translations for these three subscript expressions:
intList[0] ⇒ *(intList.items+0) intList[1] ⇒ *(intList.items+1) intList[2] ⇒ *(intList.items+2)and generally for List<T> x:
x[i] ⇒ *(x.items+i)
A dereference expression is of the form *ptr, where ptr if a pointer type expression. It yields a value of a memory location pointed by ptr. For example, after executing the following code:
int x = 42;
int* p = &x;
and then issuing the following print command:
print *p
the debugger will print a JSON object with the value field having value 42.
If *ptr is of a composite type, the value field of the printed JSON object will just have value
{...}
An address-of expression is of the form &expr, where expr can be for example a local or member variable. It yields the memory address of expr. After executing the following code:
int x;
and then issuing the following print command:
print &x;
the debugger will print a JSON object with the value field having e.g. a value "0x2ccf944".
A postfix expression consists of a primary expression followed by a possibly empty sequence of member selection, base selection, subscript and range expressions.
Member selection expression is of the form o.m, where o is an expression of a class type and m is a member variable of that class type.
If p is a pointer to a class type object, (*p).m denotes a member m of that class object. In this case the parentheses are necessary because the precedence of the member selection operator . is greater than the precedence of the dereference operator *.
Base selection expression is of the form o.base, where o is an expression of a class type having a base class. It denotes the base class object of class object o.
Substricpt expression is of the form e[index], where e is of an array, pointer or container type and index is an integer. Indeces start from 0.
When e isAfter executing the following code:
List<int> x; x.Add(1);
and then issuing the following print command:
print x[0];
the debugger will print a JSON object with the value field having value "1".
A range expression is of the form r[s,e], where r is of an array, pointer or container type, s is an integer denoting range start and e is an integer denoting range end. Ranges are half-open so that r[0,10] means indeces 0 to 10 excluding 10.
When r is of an array type that has its size specified, or of a container type, e can also be a special identifier, count, that denotes the number of elements in r.
The resulting JSON object has a field range that is a JSON array of JSON objects. Each of those JSON objects have a value field having the value of an element.
After executing the following code:
Set<int> s; s.Insert(1); s.Insert(2); s.Insert(3);
and then issuing the following print command:
print s[0,count];
the debugger will print a JSON object with a range field that is a JSON array of JSON objects that have value fields containing values 1, 2 and 3.
A primary expression can be
If x is a local variable, command
print xprints information about x and the value of x if available.
If x is of a primitive type, the resulting JSON object contains the following fields:
If x is of a class type, but not of a container type, the resulting JSON object contains the following fields:
If x is of a pointer type, the resulting JSON object contains the following fields:
If x is of a container type, the resulting JSON object contains the following fields:
A typeid expression consists of the keyword typeid followed by a type dentifier string, an UUID, in parentheses.
If t is a type identifier string, command
print tprints information about the type with identifier t as a JSON object.
The JSON object contains the following fields:
A cast expression consists of the keyword cast followed by a typeid expression in angle brackets followed by an expression in parentheses.
It casts the given expression to the type identified by the typeid expression.
cmdb can print elements of and information about the following container types:
container name | container type |
---|---|
forwardList | ForwardList<T> |
hashMap | HashMap<K, T, H, C> |
hashSet | HashSet<T, H, C> |
linkedList | LinkedList<T> |
list | List<T> |
map | Map<Key, Value, KeyCompare> |
queue | Queue<T> |
set | Set<T> |
stack | Stack<T> |
A type identifier is a UUID string of the form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". It uniquely identifies a Cmajor type.
The set condition command sets a breakpoint as a conditional breakpoint and sets the condition of that breakpoint.
set‑condition‑command | → | set condition breakpoint‑id condition |
breakpoint‑id | → | integer |
condition | → | disjunctive‑expr |
disjunctive‑expr | → | conjunctive‑expr (|| conjunctive‑expr)* |
conjunctive‑expr | → | bit‑or‑expr (&& bit‑or‑expr)* |
bit‑or‑expr | → | bit‑xor‑expr (| bit‑xor‑expr)* |
bit‑xor‑expr | → | bit‑and‑expr (^ bit‑and‑expr)* |
bit‑and‑expr | → | equality‑expr (& equality‑expr)* |
equality‑expr | → | relational‑expr ((== | !=) relational‑expr)* |
relational‑expr | → | shift‑expr ((<= | >= | < | >) shift‑expr)* |
shift‑expr | → | additive‑expr ((<< | >>) additive‑expr)* |
additive‑expr | → | multiplicative‑expr ((+ | -) multiplicative‑expr)* |
multiplicative‑expr | → | prefix‑expr ((* | / | %) prefix‑expr)* |
prefix‑expr | → | * prefix‑expr | & prefix‑expr | postfix‑expr |
postfix‑expr | → | primary‑expr (. identifier | . base | [ additive‑expr ])* |
primary‑expr | → | identifier | integer | ( disjunctive‑expr ) |
The set debugger variable command sets the state of a debugger variable. There's just one debugger variable defined at the moment: breakOnThrow.
When the breakOnThrow variable is true (default), the debugger stops the program when a throw statement is encountered. If the breakOnThrow variable is false, the program does not stop automatically on throw statements.
When a program is stopped on a throw statement, the next debugger command drives the program to the corresponding catch statement and stops the program.
set‑debugger‑var‑command | → | set breakOnThrow = (true | false) |
The exit command exists the debugger.
exit‑command | → | exit | e | quit | q |
Whenever execution of the process stops for some reason, the debugger prints a JSON object that describes the state of the process. This JSON object has the following fields:
If a debugger command fails, the debugger prints a JSON object with the following fields:
debugger‑command | → |
list‑command | break‑command | delete‑command | show‑breakpoint‑command | show‑breakpoints‑command | next‑command | step‑command | finish‑command | until‑command | continue‑command | depth‑command | frames‑command | print‑command | set‑condition‑command | set‑debugger‑var‑command | exit‑command |
list‑command | → | (list | l) list‑location? |
list‑location | → | source‑location | * |
source‑location | → | path (: line)? | line |
path | → | (drive :)? (/? (comp /)*)? comp |
drive | → | [A-Za-z] |
comp | → | [A-Za-z_.+][a-zA-Z_0-9.+-]* |
line | → | integer |
integer | → | [0-9]+ |
break‑command | → | (break | b) source‑location |
delete‑command | → | (delete | d) breakpoint-id |
breakpoint‑id | → | integer |
show‑breakpoint‑command | → | show breakpoint breakpoint-id |
show‑breakpoints‑command | → | show breakpoints |
next‑command | → | next | n |
step‑command | → | step | s |
finish‑command | → | finish | f |
until‑command | → | (until | u) source‑location |
continue‑command | → | continue | c |
depth‑command | → | depth |
frames‑command | → | frames (low‑frame‑number high‑frame‑number)? |
low‑frame‑number | → | integer |
high‑frame‑number | → | integer |
print‑command | → | (print | p) expression |
expression | → | additive‑expression |
additive‑expression | → | prefix‑expression ((+ | -) prefix‑expression)* |
prefix‑expression | → | dereference‑expression | address‑of‑expression | postfix‑expression |
dereference‑expression | → | * prefix‑expression | |
address‑of‑expression | → | & prefix‑expression | |
postfix‑expression | → |
primary‑expression ( member‑selection‑expression | base‑selection‑expression | subscript‑expression | range‑expression )* |
member‑selection‑expression | → | . identifier |
base‑selection‑expression | → | . base |
subscript‑expression | → | [ expression ] |
range‑expression | → | [ expression , expression ] |
primary‑expression | → |
identifier | this | integer | parenthesized‑expression | typeid‑expression | cast‑expression | |
identifier | → | [a-zA-Z_][a-zA-Z0-9_]* |
parenthesized‑expression | → | ( expression ) |
typeid‑expression | → | typeid ( string ) |
string | → | " ([^\n\r"]| escape )* " |
escape | → | \ ((x | X) hex‑digits | (d | D) integer | octal‑digits | u hex‑4 | U hex‑8 | [abfnrtv\"'\\]) |
hex‑digits | → | hex‑digit+ |
hex‑4 | → | hex‑digit hex‑digit hex‑digit hex‑digit |
hex‑8 | → | hex‑4 hex‑4 |
hex‑digit | → | [0-9a-fA-F] |
octal‑digits | → | [0-7]+ |
cast‑expression | → | cast < typeid‑expression > ( expression ) |
set‑condition‑command | → | set condition breakpoint‑id condition |
breakpoint‑id | → | integer |
condition | → | disjunctive‑expr |
disjunctive‑expr | → | conjunctive‑expr (|| conjunctive‑expr)* |
conjunctive‑expr | → | bit‑or‑expr (&& bit‑or‑expr)* |
bit‑or‑expr | → | bit‑xor‑expr (| bit‑xor‑expr)* |
bit‑xor‑expr | → | bit‑and‑expr (^ bit‑and‑expr)* |
bit‑and‑expr | → | equality‑expr (& equality‑expr)* |
equality‑expr | → | relational‑expr ((== | !=) relational‑expr)* |
relational‑expr | → | shift‑expr ((<= | >= | < | >) shift‑expr)* |
shift‑expr | → | additive‑expr ((<< | >>) additive‑expr)* |
additive‑expr | → | multiplicative‑expr ((+ | -) multiplicative‑expr)* |
multiplicative‑expr | → | prefix‑expr ((* | / | %) prefix‑expr)* |
prefix‑expr | → | * prefix‑expr | & prefix‑expr | postfix‑expr |
postfix‑expr | → | primary‑expr (. identifier | . base | [ additive‑expr ])* |
primary‑expr | → | identifier | integer | ( disjunctive‑expr ) |
set‑debugger‑var‑command | → | set breakOnThrow = (true | false) |
exit‑command | → | exit | e | quit | q |