1.3.94 memory set

Writes to memory.

Syntax

memory set [<verify=flag>:]address width expression

Where:

verify

Qualifies the address with a flag to specify whether the operation must perform a verify action or not. The values for flag are:

0

There is no need to verify whether the operation executed correctly.

1

The operation must verify whether it executed correctly. This is the default.

address

Specifies an address at which to write the first value. The address must be correctly aligned for the type of the specified expression.

For example:

memory set EL1N<verify=0>:0x8000 32 0x1234

If there is only one (anonymous) address space, then use:

memory set <verify=0>:0x8000 32 0x1234

width

Specifies the access width (bits) to use when writing to memory. If the width is narrower than the value being written then more than one access is used to write the value. For example:

0

enables the debugger to determine the access width

8

8‑bit

16

16‑bit

32

32‑bit

64

64‑bit.

Widths are dependent on the target, address region, and address alignment. Some access sizes might not be supported.

expression

Specifies either a single expression or an aggregate of expressions with the same size enclosed in curly braces. If there is more than one expression, then the values are written to memory sequentially with the addresses determined by the width of the type of the values.

Note:

This command sets a default address variable to the value of the memory address. Some commands, such as  x, use this default value if no address is specified.

Example 1-97 Examples

memory set 0x8000 0 "Hello"  # Writes a string to memory
memory set 0x1000 0 {(char)0x10,(char)0xFF,(char)1,(char)2,(char)3,(char)42}
                             # Is equivalent to the following commands:
                                         # set variable *(char*)0x1000 = (char)0x10
                                         # set variable *(char*)0x1001 = (char)0xFF
                                         # set variable *(char*)0x1002 = (char)1
                                         # set variable *(char*)0x1003 = (char)2
                                         # set variable *(char*)0x1004 = (char)3
                                         # set variable *(char*)0x1005 = (char)42
memory set 0x1008 0 0x1234   # Equivalent to set variable *(int*)0x1008 = 0x1234
memory set 0x1008 8 0x1234   # Same effect but forces use of 4 writes of one byte each
Non-ConfidentialPDF file icon PDF versionARM DUI0452Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.