예제 #1
0
/* static */
HRESULT CordbClass::GetStaticFieldValue2(CordbModule * pModule,
                                         FieldData * pFieldData,
                                         BOOL fEnCHangingField,
                                         const Instantiation * pInst,
                                         ICorDebugFrame * pFrame,
                                         ICorDebugValue ** ppValue)
{
    FAIL_IF_NEUTERED(pModule);
    INTERNAL_SYNC_API_ENTRY(pModule->GetProcess());
    _ASSERTE((pModule->GetProcess()->GetShim() == NULL) || pModule->GetProcess()->GetSynchronized());
    HRESULT hr = S_OK;

    if (!pFieldData->m_fFldIsStatic)
    {
        return CORDBG_E_FIELD_NOT_STATIC;
    }

    CORDB_ADDRESS pRmtStaticValue = NULL;
    CordbProcess * pProcess = pModule->GetProcess();

    if (pFieldData->m_fFldIsCollectibleStatic)
    {
        EX_TRY
        {
            pRmtStaticValue = pProcess->GetDAC()->GetCollectibleTypeStaticAddress(pFieldData->m_vmFieldDesc, 
                                                                                  pModule->GetAppDomain()->GetADToken());
        }
        EX_CATCH_HRESULT(hr);
        if(FAILED(hr)) 
        {
            return hr;
        }
    }
예제 #2
0
// This is just a convenience function to convert a regdisplay into a Context.
// Since a context has more info than a regdisplay, the conversion isn't perfect
// and the context can't be fully accurate.
void CordbRegisterSet::InternalCopyRDToContext(DT_CONTEXT * pInputContext)
{
    INTERNAL_SYNC_API_ENTRY(GetProcess());
    _ASSERTE(pInputContext);

    if ((pInputContext->ContextFlags & DT_CONTEXT_INTEGER) == DT_CONTEXT_INTEGER)
    {
        pInputContext->R0 = m_rd->R0;
        pInputContext->R1 = m_rd->R1;
        pInputContext->R2 = m_rd->R2;
        pInputContext->R3 = m_rd->R3;
        pInputContext->R4 = m_rd->R4;
        pInputContext->R5 = m_rd->R5;
        pInputContext->R6 = m_rd->R6;
        pInputContext->R7 = m_rd->R7;
        pInputContext->R8 = m_rd->R8;
        pInputContext->R9 = m_rd->R9;
        pInputContext->R10 = m_rd->R10;
        pInputContext->R11 = m_rd->R11;
    }

    if ((pInputContext->ContextFlags & DT_CONTEXT_CONTROL) == DT_CONTEXT_CONTROL)
    {
        pInputContext->Sp = m_rd->SP;
        pInputContext->Lr = m_rd->LR;
        pInputContext->Pc = m_rd->PC;
    }
}
// This is just a convenience function to convert a regdisplay into a Context.
// Since a context has more info than a regdisplay, the conversion isn't perfect
// and the context can't be fully accurate.
void CordbRegisterSet::InternalCopyRDToContext(CONTEXT *pInputContext)
{
    INTERNAL_SYNC_API_ENTRY(GetProcess());
    _ASSERTE(pInputContext);

    if((pInputContext->ContextFlags & CONTEXT_INTEGER)==CONTEXT_INTEGER)
    {
        pInputContext->Gpr1 = m_rd->SP;
        pInputContext->Gpr30 = m_rd->FP;
    }


    if((pInputContext->ContextFlags & CONTEXT_CONTROL)==CONTEXT_CONTROL)
    {
        pInputContext->Iar = m_rd->PC;
    }
}
예제 #4
0
// This is just a convenience function to convert a regdisplay into a Context.
// Since a context has more info than a regdisplay, the conversion isn't perfect
// and the context can't be fully accurate.
void CordbRegisterSet::InternalCopyRDToContext(DT_CONTEXT *pInputContext)
{    INTERNAL_SYNC_API_ENTRY(GetProcess());
    _ASSERTE(pInputContext);

    if ((pInputContext->ContextFlags & DT_CONTEXT_INTEGER) == DT_CONTEXT_INTEGER)
    {
        for (int i = 0 ; i < 29 ; ++i)
        {
            pInputContext->X[i] = m_rd->X[i];
        }
    }

    if ((pInputContext->ContextFlags & DT_CONTEXT_CONTROL) == DT_CONTEXT_CONTROL)
    {
        pInputContext->Sp = m_rd->SP;
        pInputContext->Lr = m_rd->LR;
        pInputContext->Pc = m_rd->PC;
        pInputContext->Fp = m_rd->FP;
    }
}