Call stack window

To open a call stack window, do one of the following:

The following are the buttons on the toolbar.
Call stack window tool bar
Button Description
Parameter
Enables or disables displaying parameters in function calls.
Position
Enables or disables displaying the position of the function call, that is, the filename, the file-relative and proc-relative line numbers.
Freeze
Enables or disables refreshing the window.
Edit
Opens an Editor window on the selected function if it has source code.
Locals
Opens a data explorer to show all the local variables of the selected function.
Print
Prints the ASCII text contents of the call stack window.
Close
Closes the call stack window. You can configure whether or not to have this button.

To the far right of the toolbar is the "Max Depth" field, which defines the maximum depth the debugger will display the calls stack. You can change it according to your preference. For example, if you're debugging a program on a very slow target and you only care about the first few levels of the call stack, you can decrease the number so that the window is refreshed more quickly.

Below the toolbar is the call stack pane, where the call stack is displayed up to the maximum depth. The following table lists the mouse and keyboard operations in the pane:
To do this Do this
Display a function in the source pane.
Click the function
Open an Editor window on a function.
Double click the function
Search forward in the call stack pane, if it has the focus (click in it to put focus there.)
Press Ctrl+f
Search backward in the call stack pane, if it has the focus (click in it to put focus there.)
Press Ctrl+b
Reset the search pattern, if you are searching in the call stack pane.
Press Ctrl+u

In a debugging session, whenever you change a call stack window's attributes (that is, displaying parameters, displaying location), the changes will affect subsequently created call stack windows until you change them the next time. You can also change these attributes with the cvconfig command. See cvconfig.

Call stack window and command-line function call

Suppose from the command pane, you make a function call into the debugged program, and suppose the program is stopped before the function returns to you, for example, because it hits a breakpoint. If you open a call stack window now, you will see two parts in the call stack pane. The bottom part is the call stack before you call the function, the top part is the call stack starting from the function.

Caveat

At the beginning and end of every function is a region called the prologue and epilogue. Inside this region of code, various registers may be saved and restored, and the stack pointer may be modified. Full source-level debugging is not possible within these regions. This is why no source level breakpoints are displayed here. You may single step at the machine level through this code, but you cannot trace the stack, or examine variables, or perform many other tasks until you are outside this region.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.