mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[pykd] added : assembly routine ( sssemble a single processor instruction )
git-svn-id: https://pykd.svn.codeplex.com/svn@69800 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
e8c6ac7b19
commit
1f20a6f168
@ -221,7 +221,7 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Delete synthetic symbols by virtual address" );
|
"Delete synthetic symbols by virtual address" );
|
||||||
boost::python::def( "delSynSymbolsMask", &delSyntheticSymbolsMask,
|
boost::python::def( "delSynSymbolsMask", &delSyntheticSymbolsMask,
|
||||||
"Delete synthetic symbols by mask of module and symbol name");
|
"Delete synthetic symbols by mask of module and symbol name");
|
||||||
|
boost::python::def( "assembly", &assembly, "Assemble a single processor instruction" );
|
||||||
|
|
||||||
boost::python::class_<TypeInfo>( "typeInfo",
|
boost::python::class_<TypeInfo>( "typeInfo",
|
||||||
"Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" )
|
"Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" )
|
||||||
|
@ -47,3 +47,18 @@ void disasm::doDisasm()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
ULONG64
|
||||||
|
assembly( ULONG64 offset, const std::string &instr )
|
||||||
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
ULONG64 endOffset = 0;
|
||||||
|
hres = dbgExt->control->Assemble( offset, instr.c_str(), &endOffset );
|
||||||
|
if ( FAILED( hres ) )
|
||||||
|
throw DbgException( "IDebugControl::Assemble failed" );
|
||||||
|
|
||||||
|
return endOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
@ -51,4 +51,7 @@ private:
|
|||||||
std::string m_disasm;
|
std::string m_disasm;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ULONG64
|
||||||
|
assembly( ULONG64 offset, const std::string &instr );
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user