githubEdit

r (read or modify registers)

Description of the 'r' command in HyperDbg.

Command

r

Syntax

r

r [Register (string)] [= Expr (string)]

Description

Reads or modifies registers when the debuggee is paused.

Parameters

[Register (string)] (optional)

The register that needs to be read or modified.

[= Expr (string)] (optional)

The value or the expression that needs to be evaluated and modify the target register.

circle-info

If you don't specify any parameters to the 'r' command, it shows all general-purpose + segment registers.

circle-check

Examples

If you want to see all general purpose and segment registers.

If you want to see one special register (e.g., rax).

If you want to see one special register (e.g., cs).

If you want to change a register to a constant hex value.

If you want to change a register to a new value which is the result of an expression.

SDK

To read all registers in the target debuggee, you need to use the following function in libhyperdbg:

To read a single register in the target debuggee, you need to use the following function in libhyperdbg:

To write (modify) a single register in the target debuggee, you need to use the following function in libhyperdbg:

If you want to read all registers (based on current text messaging callback or std output), you can use the following function:

If you want to read a single register (based on current text messaging callback or std output), you can use the following function:

Remarks

This command is guaranteed to keep debuggee in a halt state (in Debugger Mode); thus, nothing will change during its execution.

Requirements

None

None

Last updated