2.3.117. SEARCH

Searches memory for a specified value or pattern.

Syntax

SEARCH [{/B|/H|/W|/8|/16|/32}] [/R] [address-range [={expression | expression_string}]]

Note

/B|/H|/W are deprecated in this release.

where:

/B|/8

Sets the display format to 8 bits.

/B|/16

Sets the display format to 16 bits.

/B|/32

Sets the display format to 32 bits.

Note

If no display format is specified, the default is the native format for the debug target. For example, the ARM7TDMI processor naturally addresses 8 bits.

/R

Continues to search for the specified expression displaying each match until the end of the block or until the STOP button is used.

address-range

Specifies the range of addresses to be searched.

expression

Specifies the value to search for.

expression_string

Specifies the pattern to search for.

Description

The SEARCH command searches a memory area for the specified value or pattern string. When it is found, the debugger stops searching and displays the address where the expression was found.

If they do not fit the specified size evenly, all expressions in an expression string are padded or truncated to the size specified by the size qualifiers. If you do not specify an expression or expression string, the debugger searches the memory area for zeros. If you issue a SEARCH command without parameters, the debugger continues searching through the originally specified address range starting from where the last match was found.

The SEARCH command runs synchronously.

Examples

The following examples show how to use SEARCH:

search 0x1000..0x2000 =122

Search for the first occurrence of the byte value 122 (ASCII z), in the 4KB block of memory starting at 0x1000.

search /r 0x1000..0x2000 =163

Display all occurrences of the byte value 163 (ASCII £) in the 4KB block of memory starting at 0x1000.

search 0x1000..0x2000 ="-help"

Search for the first occurrence of the string -help in the 4KB block of memory starting at 0x1000.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111