DBREGC(1)

NAME
dbregc - IA32 Debug Register Calculator

SYNOPSIS
dbregc [-7 dr7] [-h] [-b R:AA:L:0xADDRESS] [-w 0xADDRESS,len]

DESCRIPTION
Dbregc is a program for computing the values of the IA32 hardware debug registers given the desired breakpoint specification(s). This may be useful for kernel debugging when low level access to the debug registers is available. The output of dbregc is structured to be easy to cut-and-paste into a ddb kernel debugging session.

OPTIONS

-7  Specify initial value of the ‘dr7’ register.

-h  Print usage summary.

-b R:AA:L:0xADDRESS
    Install the specified break or watchpoint.

    R   Debug register number to use (0-3).

    AA  Access type ( ‘rw’, ‘wo’, or ‘ex’ ).

    L   Length of watched area in bytes (1-4).

    ADDRESS
        Hexadecimal address of the beginning of the watchpoint.

-w 0xADDRESS,len
    Install the specified watchpoint.

    ADDRESS
        Hexadecimal address of the beginning of the watchpoint.

    len Length of the watchpoint in bytes.

Using the -b flag allows complete control over which debug register is used and the type of the watchpoint. Using the -w option assumes a write-only ( ‘wo’ ) watchpoint and will allocate as many available registers as are required to watch the specified length.

AUTHOR
Brian S. Dean <bsd@FreeBSD.org>

BUGS
Please report bugs to Brian Dean <bsd@FreeBSD.org>.