mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[0.3.x] added : explicit initialization routine ( only for console mode ) for predictable working in multithread application
git-svn-id: https://pykd.svn.codeplex.com/svn@86586 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
b25a648464
commit
7b6c8781f8
@ -11,7 +11,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
kdlib::initialize();
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
@ -19,7 +18,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
kdlib::uninitialize();
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -86,6 +86,11 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
|
||||
python::scope().attr("version") = pykdVersion;
|
||||
|
||||
python::def( "initialize", &kdlib::initialize,
|
||||
"Initialize debug engine, only for console mode" );
|
||||
python::def( "deinitialize", &kdlib::uninitialize,
|
||||
"Deintialize debug engine, only for console mode" );
|
||||
|
||||
// DbgEng services
|
||||
python::def( "setSymSrvDir", &kdlib::setSymSrvDir,
|
||||
"Set directory of SYMSRV.dll library.\nUsually this is a directory of WinDbg");
|
||||
|
@ -29,6 +29,8 @@ import customtypestest
|
||||
#import ehstatustest
|
||||
#import ehsymbolstest
|
||||
|
||||
pykd.initialize()
|
||||
|
||||
class StartProcessWithoutParamsTest(unittest.TestCase):
|
||||
def testStart(self):
|
||||
target.processId = pykd.startProcess( target.appPath )
|
||||
|
Loading…
Reference in New Issue
Block a user