The Variable Access pane displays global variables (and local static variables). For each global variable, the pane lists all functions and tasks performing read/write access on the variables, along with their attributes, such as values, read/write accesses and shared usage.
To open this pane, in the Polyspace® desktop user interface, select the button on the Result Details
pane.
For each variable and each read/write access, the Variable Access pane contains the relevant attributes. For the variables, the various attributes are listed in this table.
Attribute | Description |
---|---|
Variables | Name of Variable |
File | Source file containing variable declaration |
Values | Value (or range of values) of variable This column is empty for pointer variables. |
# Reads | Number of times the variable is read |
# Writes | Number of times the variable is written |
Written by task | Name of tasks writing on variable |
Read by task | Name of tasks reading variable |
Protection | Whether shared variable is protected from concurrent access (Filled only when Usage column has entry, Shared) The possible entries in this column are:
For more details on these entries, see Multitasking. |
Usage | Shared , if variable is shared between tasks; otherwise,
blank |
Line | Line number of variable declaration |
Col | Column number (number of characters from beginning of line) of variable declaration |
Data Type | Data type of variable (C/C++ data types or structures/classes) |
Double-click a variable name to view read/write access operations on the variable. The
arrowhead symbols and
in the Variable Access pane indicate
functions performing read and write access respectively on the global variable. Likewise,
tasks performing read and write access are indicated by the symbols
and
respectively. For further information on tasks, see
Tasks (-entry-points)
.
For access operations on the variables, the various attributes described in the pane are listed in this table.
Attribute | Description |
---|---|
Variables | Names of function (or task) performing read/write access on the variable |
Values | Value or range of values of variable in the function or task performing read/write access This column is empty for pointer variables. |
Written by task | Only for tasks: Name of task performing write access on variable |
Read by task | Only for tasks: Name of task performing read access on variable |
Line | Line number where function or task accesses variable |
Col | Column number where function or task accesses variable |
File | Source file containing access operation on variable If this
column contains the name |
For example, consider the global variable, SHR2
:
The function, Tserver
, in the file, tasks1.c
,
performs two write operations on SHR2
. This is indicated in the
Variable Access pane by the two instances of
Tserver()
under the variable, SHR2
, marked by . Likewise, the two write accesses by tasks,
server1
and server2
, are also listed under
SHR2
and marked by .
The color scheme for variables in the Variable Access pane is:
Black: global variable.
Orange: global variable, shared between tasks with no protection against concurrent access.
Green: global variable, shared between tasks and protected against concurrent access.
Gray: global variable, declared but not used in reachable code.
If a task performs certain operations on a global variable, but the operations are in unreachable code, the tasks are colored gray.
The information about global variables and read/write access operations obtained from the Variable Access pane is called the data dictionary.
You can also perform the following actions from the Variable Access pane.