[Printf event] tab


This tab is used to configure Printf events as action events (see "2.16.1 Insert printf").

A Printf event momentarily stops the execution of the program at a specified location, and executes the printf command via software processing. When a Printf event is set, the program momentarily stops immediately before executing the command at the location where this event is set, and the value of the variable expression specified in this dialog box is output to the Output panel.

Figure A.45

Action Events Dialog Box: [Printf Event] Tab

 

This section describes the following.

[How to open]

-

On the Editor panel, move the caret to the line where you wish to set a Printf event, then select [Register Action Event...] from the context menu.

-

On the Disassemble panel, move the caret to the address where you wish to set a Printf event, then select [Register Action Event...] from the context menu.

-

On the Events panel, select [Edit Condition...] from the context menu after selecting the Printf event.

[Description of each area]

(1)

[Output string] area

Type in the string to add to the Output panel directly via the keyboard (up to 1024 characters).

Note that the output string can only be one line (spaces allowed).

(2)

[Variable expression] area

Specify the variable expression(s) for the Printf event.

Type a variable expression directly into the text box (up to 1024 characters).

You can specify up to 10 variable expressions for a single Printf event by separating them with commas (",").

If this dialog box is opened with a variable expression selected in the Editor panel /Disassemble panel, the selected variable expression appears as the default.

The basic input format that can be specified as variable expressions and the values output by Printf event are as follows:

Table A.14

Relationship between Variable Expressions and Output Value (Printf Event)

Variable Expression

Output Value

C/C++ variable name Note 1

Value of a C/C++ variable

Variable expression [Variable expression]

Element values of an array

Variable expression.Member name Note 2

Member values of a structure/union/class

Variable expression -> Member name Note 2

Member values of a structure/union/class member pointed to by a pointer

Variable expression.*Cast expression

Value of a pointer to member variable

Variable expression->*Cast expression

Value of a pointer to member variable

*Variable expression

Value of a pointer variable

&Variable expression

Location address

(Type name) Variable expression

Value cast to a specified type

CPU register name

Value of a CPU register

I/O register name

Value of an I/O register

Label name Note 3, EQU symbol name Note 3, [immediate value]

Value of a label, value of an EQU symbol, a value of an immediate address

Note 1.

C89, C99, or C++ language variable

Note 2.

When using a member variable of a base class, specify the scope before the member name (e.g. variable.BaseClass::member).

Note 3.

If the label name or EQU symbol name includes a "$," be sure to enclose the name in "{ }" (Example: {$Label}).
Any imaginary number must be multiplied by an uppercase "I" (e.g. 1.0 + 2.0*I). When you specify the CPU register name "I", add ":REG" (e.g. I:REG) to distinguish it from the keyword "I".

Remark

By holding down [Ctrl]+[Space] keys in this text box, you can complete the symbol name at the present caret position (see "2.20.2 Symbol name completion function").

(3)

[Address] area

Specify the address at which to set the Printf event.

You can either type address expressions directly into the text boxes (up to 1024 characters), or select them from the input history via the drop-down list (up to 10 items). By default, address of the presently specified location is displayed.

Remark

By holding down [Ctrl]+[Space] keys in this text box, you can complete the symbol name at the present caret position (see "2.20.2 Symbol name completion function").

 

Note that the output result format by the Printf event in the Output panel are as follows:

Figure A.46

Output Result Format of Printf Event

Specified characters  Variable expression 1 = Value 1, Variable expression 2 = Value 2, Variable expression 3 = Value 3, ...

 

Specified characters

Characters specified with [Output string]

Variable expression 1 - 10

Characters specified with [Variable expression]

Value 1 - 10

Value of variable corresponds to " Variable expression 1 - 10 "

The value is displayed in a format that matches the variable type (see Table A.10 Display Form of Watch-expressions (Default)). ("?" will be displayed when the specified variable expression cannot be acquired.)

The value is also displayed in hexadecimal in bracket "( )". (If a hexadecimal value cannot be displayed, "-" will be shown instead.)

[Function buttons]

Button

Function

OK

Finishes configuring the Printf event, and sets it at the caret position in the Editor panel/Disassemble panel.

Cancel

Cancels the Printf event setup and closes this dialog box.

Help

Displays the help for this dialog box.