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