Variable lifetime

The Green Hills compilers augment the location description (register number, stack offset, memory location, etc.) for user variables with lifetime information which indicates when the value at the given location is valid.

When you use debugger commands (e.g. print or view) or data explorers to evaluate expressions, you may see the following messages next to the value of the expression:
Message Meaning
Uninitialized
The value displayed may represent an uninitialized value.
Out of Register Scope
The value displayed may be invalid because the location used to store the value of this variable may have been reused by the compiler to store the value of a temporary (or another) variable.
Optimized Away
The variable was optimized away by the compiler and does not have any storage. No value will be displayed in conjunction with this message.

Examples:
MULTI> print /d my_variable
my_variable = 0 << Uninitialized >>
MULTI> print /d my_variable
my_variable = 66952 << Out of Register Scope >>
MULTI> print /d my_variable
my_variable was optimized away

Related topic:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.