mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.3.x] added : bugCheckData ( Function reads the kernel bug check code and related parameters )
git-svn-id: https://pykd.svn.codeplex.com/svn@87300 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
8f3e1352e1
commit
bd71caf629
@ -142,4 +142,26 @@ python::list getTargetProcesses()
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
python::tuple getBugCheckData()
|
||||||
|
{
|
||||||
|
kdlib::SystemCrashInfo crashInfo = {};
|
||||||
|
|
||||||
|
do {
|
||||||
|
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
getSystemCrashInfo( crashInfo );
|
||||||
|
|
||||||
|
} while(false);
|
||||||
|
|
||||||
|
python::list lst;
|
||||||
|
lst.append(crashInfo.code);
|
||||||
|
|
||||||
|
for ( unsigned long i = 0; i < crashInfo.paramterCount; ++i)
|
||||||
|
lst.append(crashInfo.parameters[i]);
|
||||||
|
|
||||||
|
return python::tuple(lst);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
} //end namespace pykd
|
} //end namespace pykd
|
||||||
|
@ -350,6 +350,8 @@ python::list getExceptionInfoParameters( kdlib::ExceptionInfo& exceptionInfo );
|
|||||||
|
|
||||||
std::wstring printExceptionInfo( kdlib::ExceptionInfo& exceptionInfo );
|
std::wstring printExceptionInfo( kdlib::ExceptionInfo& exceptionInfo );
|
||||||
|
|
||||||
|
python::tuple getBugCheckData();
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
} //end namespace pykd
|
} //end namespace pykd
|
@ -185,6 +185,9 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Return the number of seconds since the beginning of 1970" );
|
"Return the number of seconds since the beginning of 1970" );
|
||||||
python::def("getSystemVersion", pykd::getSystemVersion,
|
python::def("getSystemVersion", pykd::getSystemVersion,
|
||||||
"Return systemVersion");
|
"Return systemVersion");
|
||||||
|
python::def( "bugCheckData", pykd::getBugCheckData,
|
||||||
|
"Function reads the kernel bug check code and related parameters\n"
|
||||||
|
"And return tuple: (code, arg1, arg2, arg3, arg4)" );
|
||||||
|
|
||||||
// Manage target memory access
|
// Manage target memory access
|
||||||
python::def( "addr64", pykd::addr64,
|
python::def( "addr64", pykd::addr64,
|
||||||
@ -756,12 +759,6 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
.def_readonly("thread", &DebugEvent::thread)
|
.def_readonly("thread", &DebugEvent::thread)
|
||||||
;
|
;
|
||||||
|
|
||||||
// python::def( "lastException", &getLastExceptionInfo,
|
|
||||||
// "Return data of last exception event: exceptionInfo" );
|
|
||||||
// python::def( "bugCheckData", &pysupport::getBugCheckData,
|
|
||||||
// "Function reads the kernel bug check code and related parameters\n"
|
|
||||||
// "And return tuple: (code, arg1, arg2, arg3, arg4)" );
|
|
||||||
|
|
||||||
python::class_<kdlib::Disasm>("disasm", "Class disassemble a processor instructions",python::no_init)
|
python::class_<kdlib::Disasm>("disasm", "Class disassemble a processor instructions",python::no_init)
|
||||||
.def( "__init__", python::make_constructor(pykd::loadDisasm ) )
|
.def( "__init__", python::make_constructor(pykd::loadDisasm ) )
|
||||||
.def( "__init__", python::make_constructor(pykd::loadDisasmWithOffset ) )
|
.def( "__init__", python::make_constructor(pykd::loadDisasmWithOffset ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user