Variable Window. freescale IDE 5.7
Advertentie
Advertentie
Working with Variables
Variable Window
2. In the Thread window toolbar, use the Process list box to specify the process that has the global variables that you want to examine.
3. Click View > Global Variables or Window > Global Variables Window.
Repeat these steps for each process that has global variables that you want to examine.
Variable Window
A Variable window allows manipulation of a single variable or variable hierarchy used in source code. For a local variable, the window closes after program execution exits the routine that defines the variable.
Figure 19.2 Variable Window
Opening a Variable Window
1. Select a variable in any window pane that lists variables.
2. Open a Variable window:
• Select Data > View Variable, or
• Double-click the variable.
A Variable window appears. Double-click a value to change it.
TIP
Use Variable windows to monitor individual variables independently of other windows. For example, use a Variable window to continue monitoring a variable that leaves the current scope of program execution in the Thread window.
Alternatively, use a contextual menu to open a variable window, as Table 19.2
explains.
IDE 5.7 User’s Guide 231
Working with Variables
Variable Window
Table 19.2 Opening a Variable Window by Using a Contextual Menu
On this host…
Windows
Macintosh
Solaris
Linux
Do this…
Right-click the variable and select View Variable.
Control-click the variable and select View Variable.
Click and hold on the variable, then select View Variable.
Click and hold on the variable, then select View Variable.
Manipulating Variable Formats
You can change the way the Variables window displays data. For example, you can add labels to variable data so that those labels appear in the Variables window and clarify the displayed data.
For example, suppose you have the structure that Listing 19.1
defines.
Listing 19.1 Sample Structure Definition
struct Rect { short short short short
}; top; left; bottom; right;
The Variables window might show an instance of the Rect structure like this: myRect 0x000DCEA8
You can create an XML file that defines a new way to display the structure, as Listing 19.2
shows.
Listing 19.2 Sample Variable Format Definition
<variableformats>
<variableformat>
<osname>osWin32</osname>
<runtimename>runtimeWin32</runtimename>
<typename>Rect</typename>
<expression>
"{T: " + ^var.top +
" L: " + ^var.left +
232 IDE 5.7 User’s Guide
Downloaden
Advertentie