gawk: Debugger Execution Control
1
1 14.3.2 Control of Execution
1 ---------------------------
1
1 Now that your breakpoints are ready, you can start running the program
1 and observing its behavior. There are more commands for controlling
1 execution of the program than we saw in our earlier example:
1
1 'commands' [N]
1 'silent'
1 ...
1 'end'
1 Set a list of commands to be executed upon stopping at a breakpoint
1 or watchpoint. N is the breakpoint or watchpoint number. Without
1 a number, the last one set is used. The actual commands follow,
1 starting on the next line, and terminated by the 'end' command. If
1 the command 'silent' is in the list, the usual messages about
1 stopping at a breakpoint and the source line are not printed. Any
1 command in the list that resumes execution (e.g., 'continue')
1 terminates the list (an implicit 'end'), and subsequent commands
1 are ignored. For example:
1
1 gawk> commands
1 > silent
1 > printf "A silent breakpoint; i = %d\n", i
1 > info locals
1 > set i = 10
1 > continue
1 > end
1 gawk>
1
1 'continue' [COUNT]
1 'c' [COUNT]
1 Resume program execution. If continued from a breakpoint and COUNT
1 is specified, ignore the breakpoint at that location the next COUNT
1 times before stopping.
1
1 'finish'
1 Execute until the selected stack frame returns. Print the returned
1 value.
1
1 'next' [COUNT]
1 'n' [COUNT]
1 Continue execution to the next source line, stepping over function
1 calls. The argument COUNT controls how many times to repeat the
1 action, as in 'step'.
1
1 'nexti' [COUNT]
1 'ni' [COUNT]
1 Execute one (or COUNT) instruction(s), stepping over function
1 calls.
1
1 'return' [VALUE]
1 Cancel execution of a function call. If VALUE (either a string or
1 a number) is specified, it is used as the function's return value.
1 If used in a frame other than the innermost one (the currently
1 executing function; i.e., frame number 0), discard all inner frames
1 in addition to the selected one, and the caller of that frame
1 becomes the innermost frame.
1
1 'run'
1 'r'
1 Start/restart execution of the program. When restarting, the
1 debugger retains the current breakpoints, watchpoints, command
1 history, automatic display variables, and debugger options.
1
1 'step' [COUNT]
1 's' [COUNT]
1 Continue execution until control reaches a different source line in
1 the current stack frame, stepping inside any function called within
1 the line. If the argument COUNT is supplied, steps that many times
1 before stopping, unless it encounters a breakpoint or watchpoint.
1
1 'stepi' [COUNT]
1 'si' [COUNT]
1 Execute one (or COUNT) instruction(s), stepping inside function
1 calls. (For illustration of what is meant by an "instruction" in
11 'gawk', see the output shown under 'dump' in ⇒Miscellaneous
Debugger Commands.)
1
1 'until' [[FILENAME':']N | FUNCTION]
1 'u' [[FILENAME':']N | FUNCTION]
1 Without any argument, continue execution until a line past the
1 current line in the current stack frame is reached. With an
1 argument, continue execution until the specified location is
1 reached, or the current stack frame returns.
1