| |||
| Home > RealView Debugger Commands > Alphabetical command reference > COMPARE | |||
Compares two blocks of memory and displays the differences.
[/R] COMPAREaddress-range, address
where:
/RInstructs 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-rangeSpecifies 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.
addressSpecifies the starting address of the block of memory to use as a comparison.
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.
The following examples show how to use COMPARE:
com
0x8100..0x82FF,0x8700Compares 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,0x8700Compares 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,0x8700Compares the contents of memory from 0x8100 to 0x81FF with
the contents of memory from 0x8700 to 088FF,
displaying all the differences found.