Prism 6.0 User's Guide

Choosing the Current File and Function

Prism uses the concepts of current file and current function.

The current file is the source file currently displayed in the source window. The current function is the function or procedure displayed in the source window. You might change the current file or function if, for example, you want to set a breakpoint in a file that is not currently displayed in the source window, and you don't know the line number at which to set the breakpoint.

In addition, changing the current file and current function changes the scope used by Prism for commands that refer to line numbers without specifying a file, as well as the scope used by Prism in identifying variables; see " How Prism Chooses the Correct Variable or Procedure" for a discussion of how Prism identifies variables. The scope pointer (-) in the line-number region moves to the current file or current function to indicate the beginning of the new scope.

To change the current file:

Figure 3-4 File Window

Graphic

To change the current function or procedure:

By default, the Func window displays only functions in files compiled with the -g switch. To display all functions in the program, click on the Select All Functions button. The button then changes to Show -g Functions; click on it to return to displaying only the -g functions.

Note that if the function you choose is in a different source file from the current file, changing to this function also has the effect of changing the current file.