mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[0.3.x] added : getSourceFileFromSrcSrv ( load and return source file from source server by the specified offset )
[0.3.x] added : getSrcPath ( return current source server path ) [0.3.x] added : setSrcPath ( set source path ) [0.3.x] added : appendSrcPath ( append current source path ) git-svn-id: https://pykd.svn.codeplex.com/svn@90664 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
db13db8683
commit
5025a7c05b
@ -421,6 +421,12 @@ inline std::wstring getSourceFile(kdlib::MEMOFFSET_64 offset = 0)
|
|||||||
return kdlib::getSourceFile(offset);
|
return kdlib::getSourceFile(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::wstring getSourceFileFromSrcSrv(kdlib::MEMOFFSET_64 offset = 0)
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
return kdlib::getSourceFileFromSrcSrv(offset);
|
||||||
|
}
|
||||||
|
|
||||||
kdlib::SystemInfo getSystemVersion();
|
kdlib::SystemInfo getSystemVersion();
|
||||||
|
|
||||||
std::wstring printSystemVersion( kdlib::SystemInfo& sysInfo );
|
std::wstring printSystemVersion( kdlib::SystemInfo& sysInfo );
|
||||||
|
@ -62,6 +62,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( loadDoubles_, pykd::loadDoubles, 2, 3 );
|
|||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( compareMemory_, pykd::compareMemory, 3, 4 );
|
BOOST_PYTHON_FUNCTION_OVERLOADS( compareMemory_, pykd::compareMemory, 3, 4 );
|
||||||
|
|
||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceFile_, pykd::getSourceFile, 0, 1 );
|
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceFile_, pykd::getSourceFile, 0, 1 );
|
||||||
|
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceFileFromSrcSrv_, pykd::getSourceFileFromSrcSrv, 0, 1 );
|
||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceLine_, pykd::getSourceLine, 0, 1 );
|
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceLine_, pykd::getSourceLine, 0, 1 );
|
||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( findSymbol_, pykd::findSymbol, 1, 2 );
|
BOOST_PYTHON_FUNCTION_OVERLOADS( findSymbol_, pykd::findSymbol, 1, 2 );
|
||||||
|
|
||||||
@ -306,8 +307,11 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
// types and vaiables
|
// types and vaiables
|
||||||
python::def( "getSourceFile", pykd::getSourceFile, getSourceFile_( python::args( "offset"),
|
python::def( "getSourceFile", pykd::getSourceFile, getSourceFile_( python::args( "offset"),
|
||||||
"Return source file by the specified offset" ) );
|
"Return source file by the specified offset" ) );
|
||||||
|
python::def("getSourceFileFromSrcSrv", pykd::getSourceFileFromSrcSrv, getSourceFileFromSrcSrv_(python::args("offset"),
|
||||||
|
"Load and return source file from source server by the specified offset") );
|
||||||
python::def( "getSourceLine", pykd::getSourceLine, getSourceLine_( python::args( "offset"),
|
python::def( "getSourceLine", pykd::getSourceLine, getSourceLine_( python::args( "offset"),
|
||||||
"Return source file name, line and displacement by the specified offset" ) );
|
"Return source file name, line and displacement by the specified offset" ) );
|
||||||
|
|
||||||
python::def( "getOffset", pykd::getSymbolOffset,
|
python::def( "getOffset", pykd::getSymbolOffset,
|
||||||
"Return traget virtual address for specified symbol" );
|
"Return traget virtual address for specified symbol" );
|
||||||
python::def( "findSymbol", pykd::findSymbol, findSymbol_( python::args( "offset", "showDisplacement"),
|
python::def( "findSymbol", pykd::findSymbol, findSymbol_( python::args( "offset", "showDisplacement"),
|
||||||
@ -456,6 +460,14 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
python::def("appendSymbolPath", pykd::appendSymbolPath,
|
python::def("appendSymbolPath", pykd::appendSymbolPath,
|
||||||
"Append current symbol path");
|
"Append current symbol path");
|
||||||
|
|
||||||
|
python::def("getSrcPath", pykd::getSrcPath,
|
||||||
|
"Return current source server path");
|
||||||
|
python::def("setSrcPath", pykd::setSrcPath,
|
||||||
|
"Set source path");
|
||||||
|
python::def("appendSrcPath", pykd::appendSrcPath,
|
||||||
|
"Append current source path");
|
||||||
|
|
||||||
|
|
||||||
// synthetic symbol
|
// synthetic symbol
|
||||||
python::def("addSyntheticSymbol", pykd::addSyntheticSymbol,
|
python::def("addSyntheticSymbol", pykd::addSyntheticSymbol,
|
||||||
"The addSyntheticSymbol function adds a synthetic symbol to a module in the current process\n"
|
"The addSyntheticSymbol function adds a synthetic symbol to a module in the current process\n"
|
||||||
|
@ -34,4 +34,25 @@ void appendSymbolPath(const std::wstring &symPath)
|
|||||||
kdlib::appendSymbolPath(symPath);
|
kdlib::appendSymbolPath(symPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
std::wstring getSrcPath()
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
return kdlib::getSrcPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void setSrcPath(const std::wstring &srcPath)
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
kdlib::setSrcPath(srcPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
void appendSrcPath(const std::wstring &srcPath)
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
kdlib::appendSrcPath(srcPath);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace pykd
|
} // namespace pykd
|
||||||
|
Loading…
Reference in New Issue
Block a user