[0.3.x] added : stackAlloc routine ( allocate bytes of space in the stack in the target process )

[0.3.x] added : stackFree routine ( free space in the stack previously allocated by stackAlloc )

git-svn-id: https://pykd.svn.codeplex.com/svn@91043 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\ussrhero_cp 2016-09-13 19:39:55 +00:00 committed by Mikhail I. Izmestev
parent c4a08ee6b0
commit c2a15c2769
2 changed files with 14 additions and 0 deletions

View File

@ -194,6 +194,16 @@ inline python::list getLocals() {
return StackFrameAdapter::getLocalsList( getCurrentFrame() );
}
inline kdlib::MEMOFFSET_64 stackAlloc(unsigned short byteCount) {
AutoRestorePyState pystate;
return kdlib::stackAlloc(byteCount);
}
inline kdlib::MEMOFFSET_64 stackFree(unsigned short byteCount) {
AutoRestorePyState pystate;
return kdlib::stackFree(byteCount);
}
class CPUContextAdapter
{

View File

@ -470,6 +470,10 @@ BOOST_PYTHON_MODULE( pykd )
"Get list of function arguments as list of tuple (name, value ) " );
python::def( "getParam", pykd::getParam,
"Get the function argument by name" );
python::def( "stackAlloc", pykd::stackAlloc,
"Allocate bytes of space in the stack in the target process" );
python::def( "stackFree", pykd::stackFree,
"Free space in the stack previously allocated by stackAlloc" );
// breakpoints
python::def( "setBp", &Breakpoint::setSoftwareBreakpoint,