| |||
| Home > Working with Debug Views > Working with registers > Changing register contents | |||
You can use in-place editing to change register contents in the Register pane. There are, however, other ways to set register values from the Code window:
Set the contents of a register by pasting variables from other windows. For example, right-click on a value in the source-level view and select Copy from the context menu. Right-click in the register whose value you want to change and select Paste Value from the context menu.
If you want to use a favorite data value that you have saved, right-click on a register and select Set from Favorites from the context menu to display a Favorites Chooser/Editor dialog box (see Using the Favorites Chooser/Editor dialog box).
Highlight a value in the Src tab in the File Editor pane and then use drag-and-drop to copy the expression into the contents of a chosen register in the Register pane. See Dragging and dropping expressions into register contents for an example.
Select Debug → Memory/Register Operations → Set Register... from the Code window main menu to display the Interactive Register Setting dialog box.
Any register contents you change are displayed in blue.
You can also set breakpoints on memory mapped registers but not on core registers, because breakpoints are set on addresses and core registers do not have addresses.
You can drag and drop an expression from a source file into the contents of a register function name. The following example shows how to you can set the PC register to the address of a function:
Load the dhrystone.axf image.
Enable line numbering and locate line 149 in the dhry_1.c source.
Double-click on the Proc_5 function
name.
Click on the function name, and drag it to the PC register.
The address of the Proc_5 function is loaded
into the PC register, and the source level view changes to show
the code for the Proc_5 function. The Dsm tab
is also updated.
If the function code is in a different source file, and that source file is not open, RealView Debugger cannot determine the context, and informs you of this in the Src tab. However, the Dsm tab is updated.
The Register pane updates automatically when register contents change. This is set by default, as indicated by the checked option Automatic Update on the Pane menu.
If you change this default option, you must update the pane display manually. Select Update Window from the Register pane context menu to update the view. RealView Debugger updates the pane contents and displays changed values in blue for improved readability.