| |||
| Home > AXD > Working with AXD > Locating and changing memory values and verifying changes | |||
To locate a value (of a variable or string, for example) in memory and change it:
Select Reload Current Image from the File menu.
Select Go from the Execute menu
(or press F5) to reach the first breakpoint, set by default at the
beginning of function main().
Select Memory from the Search menu to display the Search Memory dialog.
Enter 2’ND in the Search
for field, set the In range and to addresses
to 0x0 and 0xFFFF, and select ASCII for
the Search string type, as shown in Figure 3.9.
Click the Find button. The Memory processor view opens, and shows the contents of an area of memory, with the string you specified highlighted
Click the Cancel button to close the Search Memory dialog. Reposition and resize the Memory window if necessary, to see a display similar to that in Figure 3.10.
You might have to right-click in the window to display the
pop-up menu and set Size to 8 bit and Format
to Hex - No prefix.
The four hexadecimal values highlighted are 32
27 4E 44.
Double-click on the value 32 and, as an
example of entering a hexadecimal value, type 0x4E and
press Return.
Double-click on the value 27 and,
as an example of entering an ASCII value, type "o (a
double quote followed by a lowercase letter o) and press Return.
Double-click on the value 4E and,
as an example of entering a decimal value, type 46 and
press Return.
Double-click on the value 44 and,
as an example of entering an octal value, type o62 and
press Return.
Press F5 to continue execution, and enter a value
of, say, 100 when you are prompted in the Console
processor view for the number of runs to perform.
When the program displays its messages after completing its
tests you can see that one of the lines that in earlier examples
included the text 2’ND STRING now has No.2
STRING instead because of the change you made.
In this example, the change you made was not permanent, because you did not alter the source code or the executable image stored in a disk file. You altered only the temporary copy of the image in the target memory.