mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
#include "stdafx.h"
|
|
|
|
//#include <boost\algorithm\string\case_conv.hpp>
|
|
|
|
#include "dbgengine.h"
|
|
#include "cpureg.h"
|
|
#include "dbgexcept.h"
|
|
|
|
namespace pykd {
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
CpuReg::CpuReg( const std::string ®Name )
|
|
{
|
|
m_name = regName;
|
|
m_index = getRegIndexByName( m_name );
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
CpuReg::CpuReg( ULONG index )
|
|
{
|
|
m_index = index;
|
|
m_name = getRegNameByIndex( m_index );
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
BaseTypeVariant CpuReg::getValue()
|
|
{
|
|
return getRegVariantValue( m_index );
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
CpuReg getRegByName( const std::string ®Name )
|
|
{
|
|
return CpuReg( regName );
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
CpuReg getRegByIndex( ULONG index )
|
|
{
|
|
return CpuReg( index );
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
} // end namespace pykd
|