2.3.28. COMPARE

Compares two blocks of memory and displays the differences.

Syntax

COMPARE [/R] address-range, address

where:

/R

Instructs the debugger to continue comparing and displaying mismatches until either the end of the block is reached or you press CTRL+Break to abort the operation.

address-range

Specifies the address range to be compared using two addresses separated by the range operator (..). See Specifying address ranges for details on how to specify an address range.

address

Specifies the starting address of the block of memory to use as a comparison.

Description

A specified block of memory is compared to a block of the same size starting at a specified location.

Mismatched addresses and values are displayed. If you are using the GUI, then they are displayed in the Output view. Entering the command again at this point without parameters continues the process starting with the first byte after the mismatch.

If the contents of the two blocks of memory are the same, the debugger displays the message:

Memory blocks are the same.

COMPARE runs synchronously unless background access to target memory is supported. Use the WAIT command to force it to run synchronously.

Examples

The following examples show how to use COMPARE:

com 0x8100..0x82FF,0x8700

Compares the contents of memory from 0x8100 to 0x82FF with the contents of memory from 0x8700 to 088FF, stopping at the first mismatch.

com/r 0x8100..0x81FF,0x8700

Compares the contents of memory from 0x8100 to 0x81FF with the contents of memory from 0x8700 to 087FF, displaying all the differences found.

com/r 0x8100..+512,0x8700

Compares the contents of memory from 0x8100 to 0x81FF with the contents of memory from 0x8700 to 088FF, displaying all the differences found.

See also

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