20.1.1 Hardware registers

The hardware registers are only supported on few architectures. In this case only 'intel' 32 and 64 bits. also called 'DRx' on intel.

Radare allows you to manipulate them manually to setup 4 different breakpoints when reading, writing or executing (rwx):

[0x4A13C000]> !dr
DR0 0x00000000 x
DR1 0x00000000 x
DR2 0x00000000 x
DR3 0x00000000 x
[0x4A13C000]> !dr?
Usage: !dr[type] [args]
  dr                   - show DR registers
  dr-                  - reset DR registers
  drr [addr]           - set a read watchpoint
  drw [addr]           - set a write watchpoint
  drx [addr]           - set an execution watchpoint
  dr[0-3][rwx] [addr]  - set a rwx wp at a certain DR reg
Use addr=0 to undefine a DR watchpoint

For example. To setup a read exception at address 0xBF894404:

[0x80480303]> !dr0r 0xBF894404

The DR index can be ignored, because it can be automatically handled by radare in the same way:

[0x80480303]> !dr 0xBF894404

To remove all the values of the hw regs just type:

[0x80480303]> !dr-