mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[0.3.x] added : getProcessorType
git-svn-id: https://pykd.svn.codeplex.com/svn@84396 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
b7555ab69a
commit
c04d564c93
@ -32,6 +32,14 @@ inline void setMSR( size_t msrIndex, unsigned long long value )
|
||||
return kdlib::loadCPUCurrentContext()->setMSR( msrIndex, value );
|
||||
}
|
||||
|
||||
inline kdlib::CPUType getProcessorMode() {
|
||||
return kdlib::loadCPUCurrentContext()->getCPUMode();
|
||||
}
|
||||
|
||||
inline kdlib::CPUType getProcessorType() {
|
||||
return kdlib::loadCPUCurrentContext()->getCPUType();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -255,12 +255,10 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return MSR value" );
|
||||
python::def( "wrmsr", &setMSR,
|
||||
"Set MSR value" );
|
||||
|
||||
|
||||
// python::def( "getProcessorMode", &getProcessorMode,
|
||||
// "Return current processor mode as string: X86, ARM, IA64 or X64" );
|
||||
// python::def( "getProcessorType", &getProcessorType,
|
||||
// "Return type of physical processor: X86, ARM, IA64 or X64" );
|
||||
python::def( "getProcessorMode", &getProcessorMode,
|
||||
"Return current processor mode as string: X86, ARM, IA64 or X64" );
|
||||
python::def( "getProcessorType", &getProcessorType,
|
||||
"Return type of physical processor: X86, ARM, IA64 or X64" );
|
||||
// python::def( "setProcessorMode", &setProcessorMode,
|
||||
// "Set current processor mode by string (X86, ARM, IA64 or X64)" );
|
||||
|
||||
@ -521,6 +519,8 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
.add_property("ip", &kdlib::CPUContext::getIP )
|
||||
.add_property("sp", &kdlib::CPUContext::getSP )
|
||||
.add_property("fp", &kdlib::CPUContext::getSP )
|
||||
.def("getCPUType", &kdlib::CPUContext::getCPUType )
|
||||
.def("getCPUMode", &kdlib::CPUContext::getCPUMode )
|
||||
.def("__getattr__", &CPUContextAdaptor::getRegisterByName )
|
||||
.def("__getitem__", &CPUContextAdaptor::getRegisterByIndex );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user