mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:24:52 +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)
|
switch (ul_reason_for_call)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
kdlib::initialize();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_THREAD_ATTACH:
|
case DLL_THREAD_ATTACH:
|
||||||
@ -19,7 +18,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
kdlib::uninitialize();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -86,6 +86,11 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
|
|
||||||
python::scope().attr("version") = pykdVersion;
|
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
|
// DbgEng services
|
||||||
python::def( "setSymSrvDir", &kdlib::setSymSrvDir,
|
python::def( "setSymSrvDir", &kdlib::setSymSrvDir,
|
||||||
"Set directory of SYMSRV.dll library.\nUsually this is a directory of WinDbg");
|
"Set directory of SYMSRV.dll library.\nUsually this is a directory of WinDbg");
|
||||||
|
@ -29,6 +29,8 @@ import customtypestest
|
|||||||
#import ehstatustest
|
#import ehstatustest
|
||||||
#import ehsymbolstest
|
#import ehsymbolstest
|
||||||
|
|
||||||
|
pykd.initialize()
|
||||||
|
|
||||||
class StartProcessWithoutParamsTest(unittest.TestCase):
|
class StartProcessWithoutParamsTest(unittest.TestCase):
|
||||||
def testStart(self):
|
def testStart(self):
|
||||||
target.processId = pykd.startProcess( target.appPath )
|
target.processId = pykd.startProcess( target.appPath )
|
||||||
|
Loading…
Reference in New Issue
Block a user