Beispiel #1
0
static int ClearDebugRegs( int trap )
{
    long        dr6;
    int         i;

    if( Flags.DRsOn ) {
        out( "tr=" ); out( hex( trap ) );
        out( " dr6=" ); out( hex( GetDR6() ) );
        out( "\r\n" );
        if( trap == TRAP_WATCH_POINT ) { /* could be a 386 break point */
            dr6 = GetDR6();
            if( ( ( dr6 & DR6_B0 ) && IsBreak[0] )
             || ( ( dr6 & DR6_B1 ) && IsBreak[1] )
             || ( ( dr6 & DR6_B2 ) && IsBreak[2] )
             || ( ( dr6 & DR6_B3 ) && IsBreak[3] ) ) {
                 trap = TRAP_BREAK_POINT;
             }
        }
        for( i = 0; i < 4; ++i ) {
            IsBreak[ i ] = FALSE;
        }
        SetDR6( 0 );
        SetDR7( 0 );
    }
    return( trap );
}
Beispiel #2
0
void ClearDebugRegs( void )
{
    int i;

    for( i = 0; i < 4; i++)
        SetDRn( i, 0, 0 );
    SetDR6( 0 );
    SetDR7( 0 );
}
Beispiel #3
0
void ClearDebugRegs()
{
    int         i;
    watch       *wp;

    if( IsDPMI ) {
        for( i = WatchCount, wp = WatchPoints; i != 0; --i, ++wp ) {
            if( wp->handle >= 0 ) {
                DPMIClearWatch( wp->handle );
                wp->handle = -1;
            }
            if( wp->handle2 >= 0 ) {
                DPMIClearWatch( wp->handle2 );
                wp->handle2 = -1;
            }
        }
    } else {
        SetDR6( 0 );
        SetDR7( 0 );
    }
}