![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using the Stack WindowTo represent the current state of the program being debugged, the debugger uses a model known as the call stack. The call stack represents all currently active subprograms in the program being debugged. These are subprograms that have been called but have not returned to their caller. When the program executes, the subprogram that is currently executing is at the top of the call stack. A subprogram call `pushes' the called subprogram on top of the stack. When a subprogram returns to its caller, the returning subprogram is `popped' from the top of the stack.
The Stack window displays the current execution stack with the current context displayed at the top. Each frame row has the following format:
frame_number line_number procedure_name
When the program stops, the debugger initializes two `positions' —— the home position (execution position) and the current position (viewing position). The home position represents where the program executes next (or where the program is executing) at the current level of the call stack. The current position represents that part of the source code seen on the terminal at this moment. The viewing position changes as debugger commands display different source files or disassemble parts of the program. The execution position only changes when moving up and down the call stack. When the execution position changes, the viewing position changes to match it.
The call stack is described in Using the Apex Debugger.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |