Sun Studio 12: Debugging a Program With dbx

Popping the Call Stack

You can remove the stopped in function from the call stack, making the calling function the new stopped in function.

Unlike moving up or down the call stack, popping the stack changes the execution of your program. When the stopped in function is removed from the stack, it returns your program to its previous state, except for changes to global or static variables, external files, shared members, and similar global states.

The pop command removes one or more frames from the call stack. For example, to pop five frames from the stack, type:


pop 5

You can also pop to a specific frame. To pop to frame 5, type:


pop -f 5

For more information, see pop Command.