Examine the stack.
Sébastien Granjoux
seb.sfo@free.fr
Philip Chimento
philip.chimento@gmail.com

# Stack

# List stack frames

A stack frame is the area of the stack associated to each function call. It lists all functions and their arguments in the sequence they were called. Each stack frame is numbered starting from 0 for the current function. You can only view the stack frames while the debugger is running.

From the main menu, select View Stack to open the Stack window.

Each stack frame contains the following information:

## Active

This contains a yellow arrow to represent the active stack frame. By default it is frame 0, the current function. All evaluations and local variables are relative to this active frame. You can change the active stack frame to examine local variables in other functions.

## Frame

This is the frame number starting from 0 for the current function. The first function of your program, for example `main()` in a C program, has the highest number.

## File

The name of the file containing the function corresponding to this frame.

## Line

The line number of the function corresponding to this frame.

## Function

The name of the function corresponding to this frame.

## แอดเดรส

The address of the function corresponding to this frame.

## Arguments

The function arguments.

# Change the current stack frame

In the Stack window, select the frame you want.

Right-click and select Set current frame.

# View the current function

In the Stack window, select the frame you want.

Double-click, or right-click and select View Source.

# Get a stack trace

In the Stack window, right-click and select Get stack trace.