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. Inside your program, stack frames are identified by their addresses. Usually this address is kept in a register called the frame pointer register while execution is going on in that frame. GDB 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.
Some compilers provide a way to compile functions so that they operate without stack frames.
This is occasionally done with heavily used library functions to save the frame setup time. GDB has limited facilities for dealing with these function invocations. If the innermost function invocation has no stack frame, GDB nevertheless regards it as though it had a separate frame, which is numbered zero as usual, allowing correct tracing of the function call chain. However, GDB has no provision for frameless functions elsewhere in the stack. The frame command allows you to move from one stack frame to another, and to print the stack frame you select.