Next: , Up: Stack   [Contents][Index]


4.6.1 Stack frames

The target stack is divided up into contiguous pieces called stack frames, or frames for short. The frame contains the line number of the target which triggered the next one to be considered, the Makefile file name that the line in that refers to a target name. When some of this information is be missing you may see a filename shown as “null” or have line number 0.

When your script is started, the stack has only one frame, that of the function main. This is called the initial frame or the outermost frame. Each time a function is called, a new frame is made. Each time a function returns, the frame for that function invocation is eliminated. If a function is recursive, there can be many frames for the same function. The frame for the function in which execution is actually occurring is called the innermost frame. This is the most recently created of all the stack frames that still exist.

the GNU Make debugger assigns numbers to all existing stack frames, starting with zero for the innermost frame, one for the frame that called it, and so on upward. These numbers do not really exist in your script; they are assigned by the GNU Make debugger to give you a way of designating stack frames in the GNU Make debugger commands.