Beispiel #1
0
void CheckMADChange( void )
{
    mad_status          ms;
    mad_type_info       mti;

    if( MADActiveSet( SysConfig.mad ) != SysConfig.mad ) {
        if( MADLoaded( SysConfig.mad ) != MS_OK ) {
            ms = MADLoad( SysConfig.mad );
            if( ms != MS_OK ) {
                ReportMADFailure( ms );
            }
        }
        DbgUpdate( UP_MAD_CHANGE );
        ResizeTraceData();
        ResizeRegData();
        PendingToggles();
        if( MADCallStackGrowsUp() == MS_OK ) {
            _SwitchOn( SW_STACK_GROWS_UP );
        } else {
            _SwitchOff( SW_STACK_GROWS_UP );
        }
        GetMADTypeDefault( MTK_ADDRESS, &mti );
        if( mti.a.seg.bits != 0 ) {
            _SwitchOn( SW_HAVE_SEGMENTS );
        } else {
            _SwitchOff( SW_HAVE_SEGMENTS );
        }
        SetMADMenuItems();
        ClearMachineDataCache();
    }
}
Beispiel #2
0
BOOL InitMADInfo(void)
{
    GetSysConfig();
    if( MADInit() != MS_OK ) {
        return( FALSE );
    }
    if ( MADActiveSet( SysConfig.mad ) != MS_OK ){
        return( FALSE );
    }
    if( MADLoad(SysConfig.mad) != MS_OK  ) {
        return( FALSE );
    }
    if( AllocMadDisasmData() == FALSE ) {
        MADFini();
        return( FALSE );
    }
    return TRUE;
}