mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[0.3.x] added : module.typedVar can accept python byte sequance
git-svn-id: https://pykd.svn.codeplex.com/svn@91218 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
9cf68441ae
commit
16c796799b
@ -920,7 +920,6 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
python::class_<kdlib::TypedVar, kdlib::TypedVarPtr, python::bases<kdlib::NumBehavior>, boost::noncopyable >("typedVar",
|
python::class_<kdlib::TypedVar, kdlib::TypedVarPtr, python::bases<kdlib::NumBehavior>, boost::noncopyable >("typedVar",
|
||||||
"Class of non-primitive type object, child class of typeClass. Data from target is copied into object instance", python::no_init )
|
"Class of non-primitive type object, child class of typeClass. Data from target is copied into object instance", python::no_init )
|
||||||
.def("__init__", python::make_constructor(pykd::getTypedVarByName) )
|
.def("__init__", python::make_constructor(pykd::getTypedVarByName) )
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "stladaptor.h"
|
#include "stladaptor.h"
|
||||||
#include "pythreadstate.h"
|
#include "pythreadstate.h"
|
||||||
#include "dbgexcept.h"
|
#include "dbgexcept.h"
|
||||||
|
#include "pytypedvar.h"
|
||||||
|
|
||||||
namespace pykd {
|
namespace pykd {
|
||||||
|
|
||||||
@ -125,10 +126,9 @@ struct ModuleAdapter : public kdlib::Module
|
|||||||
return module.getTypedVarByName(symbolName);
|
return module.getTypedVarByName(symbolName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static kdlib::TypedVarPtr getTypedVarByTypeName( kdlib::Module& module, const std::wstring &typeName, kdlib::MEMOFFSET_64 offset )
|
static kdlib::TypedVarPtr getTypedVarByTypeName( kdlib::Module& module, const std::wstring &typeName, python::object& dataStorage )
|
||||||
{
|
{
|
||||||
AutoRestorePyState pystate;
|
return getTypedVarByTypeInfo( getTypeByName(module, typeName), dataStorage);
|
||||||
return module.getTypedVarByTypeName(typeName, offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static kdlib::TypedVarPtr getTypedVarWithPrototype(kdlib::Module& module, const std::wstring &symbolName, const std::wstring &prototype)
|
static kdlib::TypedVarPtr getTypedVarWithPrototype(kdlib::Module& module, const std::wstring &symbolName, const std::wstring &prototype)
|
||||||
|
Loading…
Reference in New Issue
Block a user