Local Variables panel


This panel is used to display the contents of the local variable and change the local variable values (see "2.10.5 Display/change local variables").

This panel appears only when connected to the debug tool.

Caution 1.

Nothing is displayed on this panel during execution of a program. When the execution of a program is stopped, items in each area are displayed.

Caution 2.

Due to compiler optimization, the data for the target variable may not be on the stack or in a register in blocks where that variable is not used. In this case, the target variable will not be displayed.

Caution 3.

When the selected microcontroller supports multi-core, this panel displays/changes the value regarding a core (PE) by switching selection between the target cores (see "2.7 Select a Core (PE)").

Remark 1.

This panel can be zoomed in and out by in the tool bar, or by moving the mouse wheel forward or backward while holding down the [Ctrl] key.

Note 2.

When the separator line of each area in this panel is double-clicked, the width of the area changes to the shortest possible size that can display the contents of the area.

Figure A.22

Local Variables Panel

 

This section describes the following.

[How to open]

-

From the [View] menu, select [Local Variable].

[Description of each area]

(1)

Scope area

Select the scope of the local variable to be displayed from the following drop-down list.

Item

Operation

Current

Displays local variables in the scope of the current PC value.

<Depth> <Function name() [file name#line number]>Note

Displays local variables in the scope of the calling function.

After the program is executed, the scope that is selected is maintained as long as the selected scope exists.

Note

The calling functions displayed in the Call Stack panel are displayed.

(2)

[Name] area

The local variable name or function name is displayed.

The argument of the function is also displayed as the local variable.

In addition, the hierarchical structure is displayed in tree format for arrays, pointer variables, and structures or unions.

This area cannot be edited.

The meanings of the icons are as follows:

 

Indicates the variable.

Auto variables, internal static variables, and register variables are also displayedNote.

In addition, the hierarchical structure is displayed in tree format for arrays, pointer variables, and structures or unions.

If "+" mark exist at the top of the name, the next structure is expanded by clicking it (the mark changes to "-" after the expansion).

Array

All elements in the array

Pointer variables

Variables that the pointer designates

If the pointer designates a pointer, add "+" mark and expand it by clicking the mark.

Note that if the pointer designates an unknown, "?" mark is displayed.

Structures/Unions

All the member of structures/unions

 

Indicates the argument.

 

Indicates the function.

Note

When Auto variables are used to display local variables, accurate values cannot be displayed at a prologue ("{") or epilogue ("}") of a function. The Auto variable addresses are the relative addresses from the address pointed to by the stack pointer (SP), so their addresses are not determined until the SP value is determined in the function. The SP is manipulated via prologues or epilogues, so the accurate value cannot be displayed.

 

This area is provided with the following functions.

(a)

Registering a watch-expression

Variable names of C language can be registered in the Watch panel as watch-expressions.

See "2.10.6.1 Register a watch-expression" for details on how to operate it.

Remark

A scope specification is automatically added to a registered watch-expression.

 

(b)

Jump to memory

By selecting [Jump to Memory] from the context menu, the Memory panel (Memory1) opens with moving the caret to the source line corresponding to the address where the selected local variable is disposed (if the Memory panel (Memory1) is already open, the screen will jump to the panel).

(3)

[Value] area

The value of the local variable is displayed and changed.

The notation of a data value can be selected by the button on the toolbar or the context menu item. In addition, a display format adding the value in hexadecimal number constantly can also be selected as well.

The meanings of the marks and colors displayed as the values of the local variables are as follows (character colors and background colors depend on the configuration in the [General - Font and Color] category of the Option dialog box):

Display Example (Default)

Description

 

Character color

Blue

The value of the local variable that the user is changing
Press the [Enter] key to write to the target memory.

Background color

Standard color

 

Character color

Brown

The value of the local variable that have been changed because of the execution of a programNote.

The highlighting is rest by executing again the program.

Background color

Cream

 

Character color

Gray

The value of the local variable that could not be acquired.

Background color

Standard color

Note

Variables that the name stays same from the start point where the program started executing to the breakpoint and their values are changed are the target.

 

This area is provided with the following functions.

(a)

Changing the local variable/argument value

To edit the local variable value or the argument value, select the value to edit, then change the value directly from the keyboard after clicking again on it (press the [Esc] key to cancel the edit mode).

After you edit the value of the local variable or the argument, it is written to the target memory of the debug tool by pressing the [Enter] key or moving the focus to outside the edit region.

See "2.10.5.2 Modify the contents of local variables" for details on the method for changing the local variable/argument value.

(b)

Saving the contents of the local variable

The Save As dialog box can be opened by selecting the [File] menu >> [Save Local Variables Data As...], and all the contents of this panel can be saved in a text file (*.txt) or CSV file (*.csv).

See "2.10.5.3 Save the contents of local variables" for details on the method for saving the contents of the local variable.

(4)

[Type (Byte Size)] area

The type name of the local variable is displayed. The notation accords with the description of C language.

For an array, an element number is displayed in "[]". For a function, its size (number of bytes) is displayed in "()".

This area cannot be edited.

(5)

[Address] area

The address of the local variable is displayed. When a variable is assigned to the register, the name of the register is displayed.

This area cannot be edited.

[Toolbar]

 

Acquires the latest data from the debug tool, and updates the contents of this panel.

Notation

The following buttons to specify the notation of values are displayed.

 

AutoSelect

Displays values on this panel in the default notation according to the type of variable (default).

Hexadecimal

Displays values on this panel in hexadecimal number.

Decimal

Displays values on this panel in decimal number.

Octal

Displays values on this panel in octal number.

Binary

Displays values on this panel in binary number.

Decimal Notation for Array Index

Displays array indexes on this panel in decimal number (default).

Hexadecimal Notation for Array Index

Displays array indexes on this panel in hexadecimal number.

Float

Displays values on this panel in float.

Note that when the value is not 4-byte data, or has the type information, displays it in the default notation.

Double

Displays values on this panel in double.

Note that when the value is not 4-byte data, or has the type information, displays it in the default notation.

 

Adds the value in hexadecimal number enclosing with "()" at the end of the value.

Encoding

The following buttons to specify the encoding of character variables are displayed.

 

 

Displays character variables in ASCII code (default).

 

Displays character variables in Shift-JIS code.

 

Displays character variables in EUC-JP code.

 

Displays character variables in UTF-8 code.

 

Displays character variables in UTF-16 code.

[[File] menu (Local Variables panel-dedicated items)]

The following items are exclusive for the [File] menu in the Local Variables panel (other items are common to all the panels).

Note that all these items are disabled during execution of a program.

Save Local Variables Data

Overwrites the contents of this panel to the previously saved text file (*.txt)/CSV file (*.csv) (see "(b) Saving the contents of the local variable").

Note that when the file has never been saved or the file is write disabled, the same operation is applied as the selection in [Save Local Variables Data As...].

Save Local Variables Data As...

Opens the Save As dialog box to newly save the contents of this panel to the specified text file (*.txt)/CSV file (*.csv) (see "(b) Saving the contents of the local variable").

[[Edit] menu (Local Variables panel-dedicated items)]

The following items are exclusive for [Edit] menu in the Local Variables panel (all other items are disabled).

Copy

Copies the contents of the selected line or the character string to the clipboard.

Select All

Selects all the items of this panel.

Rename

Changes to the edit mode to edit the selected local variable value (see "2.10.5.2 Modify the contents of local variables").

This item is disabled during execution of a program.

Find...

Opens the Find and Replace dialog box with selecting the [Find in Files] tab.

Replace...

Opens the Find and Replace dialog box with selecting the [Replace in Files] tab.

[Context menu]

Register to Watch1

Registers the selected local variable to the Watch panel (Watch1).

Copy

Copies the contents of the selected line or the character string to the clipboard.

Notation

The following cascade menus to specify the notation of values are displayed.

 

AutoSelect

Displays values on this panel in the default notation according to the type of variable (default).

Hexadecimal

Displays values on this panel in hexadecimal number.

Decimal

Displays values on this panel in decimal number.

Octal

Displays values on this panel in octal number.

Binary

Displays values on this panel in binary number.

Decimal Notation for Array Index

Displays array indexes on this panel in decimal number (default).

Hexadecimal Notation for Array Index

Displays array indexes on this panel in hexadecimal number.

Float

Displays values on this panel in float.

Note that when the value is not 4-byte data, or has the type information, displays it in the default notation.

Double

Displays values on this panel in double.

Note that when the value is not 4-byte data, or has the type information, displays it in the default notation.

Include Hexadecimal Value

Adds the value in hexadecimal number enclosing with "()" at the end of the value.

Encoding

The following cascade menus to specify the encoding of character variables are displayed.

 

ASCII

Displays character variables in ASCII code (default).

Shift_JIS

Displays character variables in Shift-JIS code.

EUC-JP

Displays character variables in EUC-JP code.

UTF-8

Displays character variables in UTF-8 code.

UTF-16

Displays character variables in UTF-16 code.

Jump to Memory

Opens the Memory panel (Memory1) and jumps to the memory value corresponding to the address of the selected line in this panel.