Beispiel #1
0
HRESULT CordbRegisterSet::GetRegisters(ULONG64 mask, ULONG32 regCount, CORDB_REGISTER regBuffer[])
{
    PUBLIC_REENTRANT_API_ENTRY(this);
    FAIL_IF_NEUTERED(this);
    ATT_REQUIRE_STOPPED_MAY_FAIL(GetProcess());

    UINT iRegister = 0;

    VALIDATE_POINTER_TO_OBJECT_ARRAY(regBuffer, CORDB_REGISTER, regCount, true, true);
    
    // @ARMTODO: floating point support

    for (int i = REGISTER_INSTRUCTION_POINTER;
         i <= REGISTER_ARM_LR && iRegister < regCount;
         i++)
    {
        if (mask &  SETBITULONG64(i))
        {
            switch (i)
            {
            case REGISTER_INSTRUCTION_POINTER: 
                regBuffer[iRegister++] = m_rd->PC; break;
            case REGISTER_STACK_POINTER:
                regBuffer[iRegister++] = m_rd->SP; break;
            case REGISTER_ARM_R0:
                regBuffer[iRegister++] = m_rd->R0; break;
            case REGISTER_ARM_R1:
                regBuffer[iRegister++] = m_rd->R1; break;
            case REGISTER_ARM_R2:
                regBuffer[iRegister++] = m_rd->R2; break;
            case REGISTER_ARM_R3:
                regBuffer[iRegister++] = m_rd->R3; break;
            case REGISTER_ARM_R4:
                regBuffer[iRegister++] = m_rd->R4; break;
            case REGISTER_ARM_R5:
                regBuffer[iRegister++] = m_rd->R5; break;
            case REGISTER_ARM_R6:
                regBuffer[iRegister++] = m_rd->R6; break;
            case REGISTER_ARM_R7:
                regBuffer[iRegister++] = m_rd->R7; break;
            case REGISTER_ARM_R8:
                regBuffer[iRegister++] = m_rd->R8; break;
            case REGISTER_ARM_R9:
                regBuffer[iRegister++] = m_rd->R9; break;
            case REGISTER_ARM_R10:
                regBuffer[iRegister++] = m_rd->R10; break;
            case REGISTER_ARM_R11:
                regBuffer[iRegister++] = m_rd->R11; break;
            case REGISTER_ARM_R12:
                regBuffer[iRegister++] = m_rd->R12; break;
            case REGISTER_ARM_LR:
                regBuffer[iRegister++] = m_rd->LR; break;
            }
        }
    }

    _ASSERTE (iRegister <= regCount);
    return S_OK;
}
HRESULT CordbRegisterSet::GetRegisters(ULONG32 maskCount, BYTE mask[], 
                                       ULONG32 regCount, CORDB_REGISTER regBuffer[])
{
    FAIL_IF_NEUTERED(this);
    VALIDATE_POINTER_TO_OBJECT_ARRAY(regBuffer, CORDB_REGISTER, regCount, true, true);

    return E_NOTIMPL;
}
HRESULT CordbRegisterSet::GetRegistersAvailable(ULONG32 regCount, 
                                                BYTE    pAvailable[])
{
    FAIL_IF_NEUTERED(this);
    VALIDATE_POINTER_TO_OBJECT_ARRAY(pAvailable, CORDB_REGISTER, regCount, true, true);
    
    return E_NOTIMPL;
}
Beispiel #4
0
HRESULT CordbRegisterSet::GetRegisters(ULONG32 maskCount, BYTE mask[], 
                                       ULONG32 regCount, CORDB_REGISTER regBuffer[])
{
    FAIL_IF_NEUTERED(this);
    VALIDATE_POINTER_TO_OBJECT_ARRAY(regBuffer, CORDB_REGISTER, regCount, true, true);

    // Defer to adapter for v1.0 interface
    return GetRegistersAdapter(maskCount, mask, regCount, regBuffer);
}
Beispiel #5
0
HRESULT CordbRegisterSet::GetRegistersAvailable(ULONG32 regCount, 
                                                BYTE    pAvailable[])
{
    FAIL_IF_NEUTERED(this);
    VALIDATE_POINTER_TO_OBJECT_ARRAY(pAvailable, CORDB_REGISTER, regCount, true, true);
    
    // Defer to adapter for v1.0 interface
    return GetRegistersAvailableAdapter(regCount, pAvailable);
}
HRESULT CordbRegisterSet::GetRegisters(ULONG64 mask, ULONG32 regCount,
                                       CORDB_REGISTER regBuffer[])
{ 
    FAIL_IF_NEUTERED(this);
    UINT iRegister = 0;

    VALIDATE_POINTER_TO_OBJECT_ARRAY(regBuffer, CORDB_REGISTER, regCount, true, true);
    
    if( mask &  SETBITULONG64(REGISTER_INSTRUCTION_POINTER) )
    {
        regBuffer[iRegister++] = m_rd->PC;
    }

    _ASSERTE( iRegister <= regCount );
    return S_OK;
}
Beispiel #7
0
HRESULT CordbRegisterSet::GetRegisters(ULONG64 mask, ULONG32 regCount,
                                       CORDB_REGISTER regBuffer[])
{ 
    PUBLIC_REENTRANT_API_ENTRY(this);
    FAIL_IF_NEUTERED(this);
    ATT_REQUIRE_STOPPED_MAY_FAIL(GetProcess());

    UINT iRegister = 0;

    VALIDATE_POINTER_TO_OBJECT_ARRAY(regBuffer, CORDB_REGISTER, regCount, true, true);
    
    // @ARM64TODO: floating point support

    for (int i = REGISTER_ARM64_X0;
         i <= REGISTER_ARM64_PC && iRegister < regCount;
         i++)
    {
        if (mask &  SETBITULONG64(i))
        {
            if ((i >= REGISTER_ARM64_X0) && (i <= REGISTER_ARM64_X28))
            {
                regBuffer[iRegister++] = m_rd->X[i - REGISTER_ARM64_X0];
                continue;
            }

            switch (i)
            {
            case REGISTER_ARM64_PC: 
                regBuffer[iRegister++] = m_rd->PC; break;
            case REGISTER_ARM64_SP:
                regBuffer[iRegister++] = m_rd->SP; break;
            case REGISTER_ARM64_FP:
                regBuffer[iRegister++] = m_rd->FP; break;
            case REGISTER_ARM64_LR:
                regBuffer[iRegister++] = m_rd->LR; break;
            default:
                _ASSERTE(false); break;
            }
        }
    }

    _ASSERTE (iRegister <= regCount);
    return S_OK;
}