diff --git a/gdb-port/README b/gdb-port/README index e250f10ff031de19362359890130ea6ff6bf6dfb..682605ed1290374dc55cb994161e4bda56e497da 100644 --- a/gdb-port/README +++ b/gdb-port/README @@ -31,7 +31,7 @@ hammer-parse-stop-at-input-pos <number> Stops execution once the parsing process reaches past position `<number>` in the input stream. Two caveats: since parsers can consume more than one byte, the argument given is a lower bound of the actual stop position. Additionally, if a parser consumes enough input to reach the requested position, but would later fail, execution is stopped when position `<number>` is reached. ``` -hammer-parse-step <number> +hammer-parse-step [number] ``` Advance the parsing process by calling the next <number> parsers on the input (according to the declared H_RULEs). For example, given: @@ -44,14 +44,14 @@ H_RULE(b, h_sequence(b_2, b_2, NULL)); H_RULE(a_b, h_sequence(a, b, NULL)); ``` -Stopping at `a_b` and invoking the command will stop at the invocation of the following parsers: +Stopping at `a_b` and invoking the command will stop at the applications of the following parsers: a, b, b_2, b_2 Invoking `hammer-parse-step 2` would result in the following list: b, b_2 -This is not based on input positions, but roughly equivalent to stopping execution at the next CALL instruction. See also `hammer-parser-backtrace`. +This is not equivalent to advancing the input stream by [number] bytes, rather, it is equivalent to running until the next [number] pushes on the parser stack. See also `hammer-parser-backtrace`. ``` hammer-parse-continue @@ -62,7 +62,7 @@ Alias of GDB `continue`. May change later. Querying: ``` -hammer-parser-backtrace <number> +hammer-parser-backtrace [number] ``` Print the "call stack" for parsers. A call to `perform_lowlevel_parse` corresponds to a push to the stack, while a return from it corresponds to popping the stack. `<number>` controls the number of items to print. If the parameter is not given, the entire stack is printed.