mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[0.3.x] workitem/13549: addSynSymbol is not defined. addSyntheticSymbol and removeSyntheticSymbol functions added
git-svn-id: https://pykd.svn.codeplex.com/svn@90464 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
516095649c
commit
60d3b958b8
@ -165,4 +165,32 @@ python::tuple getBugCheckData()
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
kdlib::SyntheticSymbol addSyntheticSymbol( kdlib::MEMOFFSET_64 offset, unsigned long size, const std::wstring &name )
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
return kdlib::addSyntheticSymbol(offset, size, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void removeSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol)
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
return kdlib::removeSyntheticSymbol(syntheticSymbol);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
std::wstring printSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol)
|
||||||
|
{
|
||||||
|
std::wstringstream sstream;
|
||||||
|
|
||||||
|
sstream << L"moduleBase=0x" << std::hex << syntheticSymbol.moduleBase << std::endl;
|
||||||
|
sstream << L"symbolId= 0x" << std::hex << syntheticSymbol.symbolId << std::endl;
|
||||||
|
|
||||||
|
return sstream.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
} //end namespace pykd
|
} //end namespace pykd
|
||||||
|
@ -431,6 +431,10 @@ std::wstring printExceptionInfo( kdlib::ExceptionInfo& exceptionInfo );
|
|||||||
|
|
||||||
python::tuple getBugCheckData();
|
python::tuple getBugCheckData();
|
||||||
|
|
||||||
|
kdlib::SyntheticSymbol addSyntheticSymbol( kdlib::MEMOFFSET_64 offset, unsigned long size, const std::wstring &name );
|
||||||
|
void removeSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol);
|
||||||
|
std::wstring printSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
} //end namespace pykd
|
} //end namespace pykd
|
||||||
|
@ -456,6 +456,13 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
python::def("appendSymbolPath", pykd::appendSymbolPath,
|
python::def("appendSymbolPath", pykd::appendSymbolPath,
|
||||||
"Append current symbol path");
|
"Append current symbol path");
|
||||||
|
|
||||||
|
// synthetic symbol
|
||||||
|
python::def("addSyntheticSymbol", pykd::addSyntheticSymbol,
|
||||||
|
"The addSyntheticSymbol function adds a synthetic symbol to a module in the current process\n"
|
||||||
|
"Note: reloading the symbols for the module deletes all synthetic symbols associated with that module.");
|
||||||
|
python::def( "removeSyntheticSymbol", pykd::removeSyntheticSymbol,
|
||||||
|
"The removeSyntheticSymbol function removes a synthetic symbol from a module in the current proces" );
|
||||||
|
|
||||||
python::class_<kdlib::NumBehavior, boost::noncopyable>( "numVariant", "numVariant", python::no_init )
|
python::class_<kdlib::NumBehavior, boost::noncopyable>( "numVariant", "numVariant", python::no_init )
|
||||||
.def("__init__", python::make_constructor(&NumVariantAdaptor::getVariant) )
|
.def("__init__", python::make_constructor(&NumVariantAdaptor::getVariant) )
|
||||||
.def( "__eq__", &NumVariantAdaptor::eq )
|
.def( "__eq__", &NumVariantAdaptor::eq )
|
||||||
@ -821,9 +828,6 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Build number for the target's operating system")
|
"Build number for the target's operating system")
|
||||||
.def_readonly( "buildString", &kdlib::SystemInfo::buildDescription,
|
.def_readonly( "buildString", &kdlib::SystemInfo::buildDescription,
|
||||||
"String that identifies the build of the system")
|
"String that identifies the build of the system")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//.def_readonly( "servicePackString", &SystemVersion::servicePackString,
|
//.def_readonly( "servicePackString", &SystemVersion::servicePackString,
|
||||||
// "String for the service pack level of the target computer")
|
// "String for the service pack level of the target computer")
|
||||||
//.def_readonly( "isCheckedBuild", &SystemVersion::isCheckedBuild,
|
//.def_readonly( "isCheckedBuild", &SystemVersion::isCheckedBuild,
|
||||||
@ -1051,6 +1055,15 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Breakpoint hit callback")
|
"Breakpoint hit callback")
|
||||||
;
|
;
|
||||||
|
|
||||||
|
python::class_<kdlib::SyntheticSymbol>(
|
||||||
|
"syntheticSymbol", "Structure describes a synthetic symbol within a module", python::no_init)
|
||||||
|
.def_readonly( "moduleBase", &kdlib::SyntheticSymbol::moduleBase,
|
||||||
|
"The location in the target's virtual address space of the module's base address")
|
||||||
|
.def_readonly( "symbolId", &kdlib::SyntheticSymbol::symbolId,
|
||||||
|
"The symbol ID of the symbol within the module")
|
||||||
|
.def("__str__", pykd::printSyntheticSymbol,
|
||||||
|
"Return object as a string");
|
||||||
|
|
||||||
// C++ exception translation to python
|
// C++ exception translation to python
|
||||||
pykd::registerExceptions();
|
pykd::registerExceptions();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user