gawk: Execution Stack
1
1 14.3.4 Working with the Stack
1 -----------------------------
1
1 Whenever you run a program that contains any function calls, 'gawk'
1 maintains a stack of all of the function calls leading up to where the
1 program is right now. You can see how you got to where you are, and
1 also move around in the stack to see what the state of things was in the
1 functions that called the one you are in. The commands for doing this
1 are:
1
1 'backtrace' [COUNT]
1 'bt' [COUNT]
1 'where' [COUNT]
1 Print a backtrace of all function calls (stack frames), or
1 innermost COUNT frames if COUNT > 0. Print the outermost COUNT
1 frames if COUNT < 0. The backtrace displays the name and arguments
1 to each function, the source file name, and the line number. The
1 alias 'where' for 'backtrace' is provided for longtime GDB users
1 who may be used to that command.
1
1 'down' [COUNT]
1 Move COUNT (default 1) frames down the stack toward the innermost
1 frame. Then select and print the frame.
1
1 'frame' [N]
1 'f' [N]
1 Select and print stack frame N. Frame 0 is the currently
1 executing, or "innermost", frame (function call); frame 1 is the
1 frame that called the innermost one. The highest-numbered frame is
1 the one for the main program. The printed information consists of
1 the frame number, function and argument names, source file, and the
1 source line.
1
1 'up' [COUNT]
1 Move COUNT (default 1) frames up the stack toward the outermost
1 frame. Then select and print the frame.
1