Call Stack Window
Each thread in an application has a separate call stack, and you can open a Call Stack window for each thread. The call stack shows all calls to procedures, frames, and user class methods.
To open the Call Stack window for a thread
Use any of the following methods:
• In the Debugger window for the thread, click Tools, Call Stack.
• In the Debugger window, click the Call Stack toolbar button.
• On the Thread Map portlet of the Monitor tab, right-click a thread box and select Call Stack from the pop-up menu.
The Call Stack window displays lists of frames and procedures in the order in which they are called, with the most recently called frame or procedure at the top of the list.
After being opened, a Call Stack window remains open until you close it or until the thread terminates.
Note: While a thread is running, the Call Stack window is not updated automatically and does not always reflect the current state of the thread. However, you can always display the current state of the call stack by clicking File, Snapshot in the Call Stack window.
If a frame or procedure in the call stack was called with arguments, the name of the frame or procedure in the Call Stack window is preceded by an icon. You can click the icon to see the arguments passed to the procedure or the frame when it was called. If any of the arguments is an array or reference variable, the argument is displayed with an icon, and you can click the icon to expand the display and see the values of the attributes.
The values shown for the arguments are the values that are passed to the called frame or procedure from the calling frame or procedure. The call stack reflects any changes that the called frame or procedure makes to the following:
• Arguments of varchar data type
• Attributes of any argument that is a reference variable
With the exception of varchar variables, the call stack does not reflect any changes made by the called frame or procedure to arguments that have a simple data type. Additionally, if the called frame or procedure reassigns a reference variable that it received as a parameter, any subsequent changes to the attributes of that variable are not reflected in the call stack.
In addition to the names and argument values for frames and procedures, the Call Stack display provides other useful information:
• When a frame is opened with an openframe statement so that it is the first frame on the call stack, the name of the calling frame and its thread identification are displayed.
• The current frame is always shown as the last item on the call stack even if it was started with a gotoframe statement. If a frame is started with a gotoframe statement, it replaces the last frame or procedure on the stack that was started with a call statement. If the last frame on the stack resulted from a series of gotoframe statements with no intervening calls, expanding the information for the frame provides a summary of the previous gotoframe statements.
• When you click an icon associated with a frame, any attributes passed using a with clause are displayed with any parameters that were passed. An attribute passed using a with clause can be distinguished from an argument because “WITH” appears at the beginning of the line.
• If an argument was passed by reference, the description of the argument ends with “,BYREF.”
Last modified date: 12/20/2023