Next: , Previous: , Up: Debugging   [Contents][Index]

5.6 Writing to CPU registers

Sometimes it is useful to be able to explicitly set the value of a CPU register. This can be done using the write-register command. For example to write the hexadecimal value F0D4 to the stack pointer, you would use the command

write-register SP 0xF0D4

You can write to more than one register in a single command. For example, the command

write-register SP 0x2000 PC 0xFE0000 D0 0x34

writes the hexadecimal value 2000 to the ‘SP’ register, the FE0000 to the ‘PC’ register and 34 to the ‘D0’ register.