Analysis of a Function's Identifiers

If the number of lines of a function is important, it can be difficult to see the evolution of a variable usage. This utility builds 'cuts' through the program text, showing you a reduced number of lines: those that contain the identifier that you want to investigate. You can reach this option by choosing "Utilities", then "Analysis", then "Slice by local".

This option allows you to visualize only the lines of the function that contain the given identifier. It is designed to show more clearly the evolution of the contents of a variable and to easily identify if there is a problem. If the first line does not contain an assignment statement, for instance, it is likely that an uninitialized variable problem exists. The variables are classified in three groups:

    Local variables (left column)

    Arguments (center)

    External symbols (right)

 

An external symbol in this context means all the identifiers that are not defined as locals or arguments. This includes the #define statements that the function uses and the names of all typedefs used. This does not correspond to a strict C external definition, but rather to the importation of names and to the dependencies created by this importation.

It is simple to use: click on the symbol that you want to investigate and all affected lines will be shown at the top of the three lists.

At the lower left you will find the function's prototype.