Next: , Previous: , Up: Debugger Command Reference   [Contents][Index]


4.6 Examining the Stack (‘where’, ‘frame’, ‘up’, ‘down’)

When you enter the debugger, one thing you’ll probably want to know is where it stopped and some idea of how it got there.

Each time your Makefile performs dependency checking (sometimes as implicit rules or pattern-substitution rules), information about the target that caused the new target to be considered action is saved on a stack. This target call stack then is this a history of the dependency checks that got you to the point that you are currently stopped at.

One of the stack frames is selected by the GNU Make debugger and many the GNU Make debugger commands refer implicitly to the selected frame. In particular, whenever you ask the GNU Make debugger to list lines without giving a line number or location the value is found in the selected frame. There are special the GNU Make debugger commands to select whichever frame you are interested in. See Selecting a frame.

When your program stops, the GNU Make debugger automatically selects the currently executing frame and describes it briefly, similar to the frame command.