Call Hierarchy in Polyspace Platform User Interface
This topic focuses on the Polyspace® Platform user interface. To learn about the equivalent pane in the Polyspace desktop user interface, see Call Hierarchy in Polyspace Desktop User Interface.
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.
Open the Call Hierarchy pane by selecting 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.
Tip
To navigate to the call location in the source code, select a caller or callee name
The line number in the Call Hierarchy pane refers to a different line in the source code:
For the function name, the line number refers to the beginning of the function definition. The definition of
generic_validation
begins on line 66.For a callee name, the number refers to the line where the callee is called. The callee
functional_ranges
is called bygeneric_validation
on line 82.For a caller name, the number refers to the line where the caller calls the function. The caller
main
callsgeneric_validation
on line 51.
In the Call Hierarchy pane, you can perform these actions:
Show/Hide callers and callees — Customize the view to display callers only or callees only. Show or hide callers and callees by clicking this button
Navigate Call Hierarchy — You can navigate the call hierarchy in your source code. For a function, click a caller or callee name to navigate to the caller or callee definition in the source code.
Determine if a function is stubbed — 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.
User specified: You override the function definition by using the option
Functions to stub (-functions-to-stub)
.Lookup table: You verify generated code with functions that return values from specific kinds of lookup tables. You use the option
Generate stubs for Embedded Coder lookup tables (-stub-embedded-coder-lookup-table-functions)
.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
.Compilation error: There is a compilation error in the function body, and therefore the function cannot be analyzed.