SET VALUE

Assign a specific value to an expression.

Syntax

SET VALUE [/SIZE=size] [/REPEAT={number | dbvar}] expression=value,...

Parameters

/SIZE=size

The result is converted unsigned to the size which is given by size, and written. The size defaults to BYTE.

The parameter size may have one of the following values:

BYTE

The contents is displayed as a sequence of byte values.

DOUBLE

The contents is displayed as a sequence of 64 bit IEEE floating point variables.

EXTENDED

The contents is displayed as a sequence of 96 bit IEEE floating point variables.

FLOAT

The contents is displayed as a sequence of 32 bit IEEE floating point variables.

LONG

The contents is displayed as a sequence of 32-bit long words.

LONGDOUBLE

The contents is displayed as a sequence of 80-bit floating point numbers.

LONGLONG

The contents is displayed as a sequence of 64-bit numbers.

WORD

The contents is displayed as a sequence of 16-bit words.

/REPEAT={number | dbvar}

The value value is assigned not only to the expression denoted by expression but also to the following number addresses in memory. For example, if number equals 3, value is written four times to memory.

Alternatively, you can specify a debugger variable, dbvar, as repeat value.

Description

The SET VALUE command assigns all provided values to the expression. If no /SIZE parameter is given, the written data width is equal to the width of the object referenced by expression. If structured data types are used, only complete member identifications are permitted.

This command is also used to write target memory. If the expression given is an address, the debugger uses that address in memory and modifies the value to be the new value. If you are dereferencing a variable as a memory address, use the cast *(void*) which will cast the address to an arbitrary pointer (see examples below). When modifying memory without /SIZE parameter, the default is set to LONG.

If expression is a debugger variable @dbvar, the debugger variable @dbvar is set to the value value. Debugger variables inherit the type of the assigned result. For example, if expression is the debugger variable @FOUND_MEMORY, the offset that results from the SEARCH MEMORY command is replaced by value.

The value of predefined debugger variables which are read-only cannot be changed. Read-only debugger variables may be displayed using SHOW DBVAR *.

Example

SET VALUE loop = 10
SET VALUE angle = -1.271e-13
SET VALUE @input=0
SET VALUE @input=@input+1
SET VALUE /SIZE=BYTE 0xBADE44FC = 0xAC
SET VALUE /SIZE=LONG *(void*) (sysreg(ESP)+4) = 0x80000024
set value *(char*)0x1000='h','e','l','l','o',0

See Also

For more complete information about compiler optimizations, see our Optimization Notice.