This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Call Hierarchy

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 (functions) or (tasks). The callees are indicated by (functions) or (tasks). The Call Hierarchy pane lists direct function calls and indirect calls through function pointers. The indirect calls are shown with the icon. Calls that are unreachable are shown with the function name in grey.

You open the Call Hierarchy pane by using the icon in your result details. To update the pane:

  • You can click a run-time check, either on the Results List or Source pane. You see the function containing the check with its callers and callees.

  • You can click a function name in your source code. You see the callers and callees of the function. If the function name also shows a run-time check color, instead of clicking the function name, right-click the name and select Go To Definition.

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

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 69.

  • For a callee name, the number refers to the line where the callee is called. The callee functional_ranges is called by generic_validation on line 86.

  • For a caller name, the number refers to the line where the caller calls the function. The caller main calls generic_validation on line 50.

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:

  •  Show/Hide Callers and Callees

  •  Navigate Call Hierarchy

  •  Determine if Function is Stubbed

  •  See Call Hierarchy of Program