Пример #1
0
static bool AEnum( dr_handle var, int index, void *_de )
{
    enum_range *de = _de;
    int_32  value;

    index = index;
    if( !DRConstValAT( var, (uint_32 *)&value ) ) {
        return( FALSE );
    }
    if( value < de->low ) {
        de->low = value;
    } else if( value > de->high ) {
        de->high = value;
    }
    return( TRUE );
}
Пример #2
0
static bool AEnum( drmem_hdl var, int index, void *_de )
{
    enum_range *de = _de;
    int_32  value;

    index = index;
    if( !DRConstValAT( var, (uint_32 *)&value ) ){
        return( false );
    }
    if( value < de->low ){
        de->low = value;
    }else if( value > de->high ){
        de->high = value;
    }
    return( true );
}
Пример #3
0
static bool GetDrVal( array_wlk_wlk *df, dr_val32 *val, int_32 *ret )
/*******************************************************************/
// extract the value from val
{
    switch( val->val_class ) {
    case DR_VAL_INT:
        *ret = val->val.s;
        return( TRUE );
    case DR_VAL_REF:
        if( DRConstValAT( val->val.ref, (uint_32*)ret ) ) {
            return( TRUE );
        } else if( GetSymVal( df->ii, val->val.ref, df->lc, ret ) ) {
            return( TRUE );
        }
    }
    return( FALSE );
}