pykd/pykd/cpureg.cpp
SND\kernelnet_cp 3a47a6574d [0.2.x] added : cpuReg class
git-svn-id: https://pykd.svn.codeplex.com/svn@78577 9b283d60-5439-405e-af05-b73fd8c4d996
2017-11-08 17:42:50 +04:00

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 &regName )
{
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 &regName )
{
return CpuReg( regName );
}
///////////////////////////////////////////////////////////////////////////////////
CpuReg getRegByIndex( ULONG index )
{
return CpuReg( index );
}
///////////////////////////////////////////////////////////////////////////////////
} // end namespace pykd