mr subcommand
The mr subcommand modifies general purpose, segment, special, or floating point registers.
Format
mr [gp | sr | sp | fp | reg_name]
Parameters
Item | Description |
---|---|
gp | Modifies general purpose registers. |
sr | Modifies segment registers. |
sp | Modifies special purpose registers. |
fp | Modifies floating point registers. |
reg_name | Modifies a specific register by name. |
Individual registers can also be selected for modification by register name. The current thread context is used to locate the register values to be modified. Use the sw subcommand to change the context to other threads. When the register being modified is in the mst subcommand context, the KDB kernel debugger alters the Machine Save State Area. When the register being modified is a special register, the register is altered immediately. Symbolic expressions are allowed as input.
If the gp, sr, sp, or fp options are used, modification of all of the registers in the group is allowed. The current value for a single register is shown and modification is allowed. Then, the value for the next register is displayed for modification. Entry of an invalid character, such as a period (.), ends modification of the registers. If the value for a register is to be left unmodified, press Enter to continue to the next register for modification.
Other
No aliases.
Examples
The following is an example of how to use the mr subcommand:
KDB(0)> dc @iar //print current instruction
.open+000000 mflr r0
KDB(0)> mr iar //modify current instruction address
iar : 001C5BA0 = @iar+4
KDB(0)> dc @iar //print current instruction
.open+000004 stw r31,FFFFFFFC(stkp)
KDB(0)> mr iar //restore current instruction address
iar : 001C5BA4 = @iar-4
KDB(0)> dc @iar //print current instruction
.open+000000 mflr r0
KDB(0)> mr sr //modify first invalid segment register
s0 : 00000000 = <CR/LF>
s1 : 60000323 = <CR/LF>
s2 : 20001E1E = <CR/LF>
s3 : 007FFFFF = 0
s4 : 007FFFFF = . //end of input
KDB(0)> dr s3 //print segment register 3
s3 : 00000000
KDB(0)> mr s3 //restore segment register 3
s3 : 00000000 = 007FFFFF
KDB(0)> mr f29 //modify floating point register f29
f29 : 0000000000000000 = 000333335999999A
KDB(1)> mr vr0 //modify vector register vr0
vr0 : 00000000000000000000000000000000 = 1122334455667788 <CR/LF>
= 99aabbccddeeff00
KDB(0)> dr f29
f29 : 000333335999999A
KDB(1)> dr vr0 //dump vector register vr0
vr0 : 112233445566778899AABBCCDDEEFF00
KDB(0)> u
Uthread [2FF3B400]:
save@......2FF3B400 fpr@.......2FF3B550
...
KDB(0)> dd 2FF3B550 20
__ublock+000150: C027C28F5C28F5C3 000333335999999A .'..\(....33Y...
__ublock+000160: 3FE3333333333333 3FC9999999999999 ?.333333?.......
__ublock+000170: 7FF0000000000000 00100000C0000000 ................
__ublock+000180: 4000000000000000 000000009A068000 @...............
__ublock+000190: 7FF8000000000000 00000000BA411000 .............A..
__ublock+0001A0: 0000000000000000 0000000000000000 ................
__ublock+0001B0: 0000000000000000 0000000000000000 ................
__ublock+0001C0: 0000000000000000 0000000000000000 ................
__ublock+0001D0: 0000000000000000 0000000000000000 ................
__ublock+0001E0: 0000000000000000 0000000000000000 ................
__ublock+0001F0: 0000000000000000 0000000000000000 ................
__ublock+000200: 0000000000000000 0000000000000000 ................
__ublock+000210: 0000000000000000 0000000000000000 ................
__ublock+000220: 0000000000000000 0000000000000000 ................
__ublock+000230: 0000000000000000 000333335999999A ..........33Y...
__ublock+000240: 0000000000000000 0000000000000000 ................
KDB(0)>