From a894103ddb27787075932e388ad3af93732aba6d Mon Sep 17 00:00:00 2001 From: pompolic <pompolic@special-circumstanc.es> Date: Wed, 3 Nov 2021 03:27:30 +0100 Subject: [PATCH] README clarifications --- gdb-port/README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb-port/README b/gdb-port/README index e250f10..682605e 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. -- GitLab