Main Content

Call Hierarchy in Polyspace Access Web Interface

R2026b

The Call Hierarchy pane displays the call tree of functions in the source code.

For each function foo, the Call Hierarchy pane lists the functions and tasks that call foo (callers) and those called by foo (callees). The callers are indicated by . The callees are indicated by . The Call Hierarchy pane lists direct function calls and indirect calls through function pointers.

Note

For Polyspace® Access™ findings, you might not see all callers or callees of a function, especially for calls through function pointers and dead code.

For instance, Polyspace Access does not display the functions registered with at_exit() and at_quick_exit(), and called by exit() and quick_exit() respectively.

You open the Call Hierarchy pane by using the icon in your Results Details pane, or by going to Window > Call Hierarchy.

To update the pane, click a defect on the Results List or CTRL-click a result in the Source Code pane. You see the function containing the defect with its callers and callees.

In this example, the Call Hierarchy pane displays the function generic_validation, and with its callers and callees.

The Call Hierarchy pane shows the generic_validation function followed by its callers and callees. The File column shows names of files where the calls occur and the Stubbed column states if a callee is stubbed.

Tip

To navigate to the call location in the source code, select a caller or callee name

In the Call Hierarchy pane, you can perform these actions:

  • Customize the view to display callers only or callees only. Show or hide callers and callees by clicking this button

    Buttons to show/hide callers and callees

  • You can navigate the call hierarchy in your source code. For a function, double-click a caller or callee name to navigate to the caller or callee definition in the source code.

  • From the Stubbed column, you can determine if a function is stubbed. The entries in the column show why a function was stubbed.

    • Automatic: Polyspace cannot find the function definition. For instance, you did not provide the file containing the definition.

    • Std library: The function is a standard library function. You do not provide the function definition explicitly in your Polyspace project.

    • Mapped to std library: You map the function to a standard library function by using the option -code-behavior-specifications (Polyspace Bug Finder).