14.6. Changing the stack pointer

The address of the stack is determined from SP register. You can change the address of the stack by modifying the SP register.

To change the stack pointer, you must stop execution at a specific point of interest. You can specify where execution stops by:

To change the stack pointer:

  1. Select View → Registers from the Code window main menu to open the Registers view. Figure 14.23 shows an example:

    Figure 14.23. Registers view

    Registers view

  2. Double-click on the SP register. The field containing the value changes to allow in-place editing, shown in Figure 14.24.

    Figure 14.24. In-place editing of the SP register

    In-place editing of the SP register

  3. Change the value of the SP register to the required value, for example, 0x01FFD900. Alternatively, press Esc to cancel the change. The register value reverts back to the value before you made any changes.

  4. Press Enter to confirm the change. If the Stack view is visible, then the Stack view is updated and starts at the new SP register address, shown in Figure 14.25.

    Figure 14.25. Stack view for new SP register address

    Stack view for new SP register address

See also:

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