Commit e4bbc369 authored by SND\EreTIk_cp's avatar SND\EreTIk_cp
Browse files

[~] viod -> void

[+] variable for PyThread_StateSave

git-svn-id: https://pykd.svn.codeplex.com/svn@69451 9b283d60-5439-405e-af05-b73fd8c4d996
parent f443f0cb
......@@ -14,7 +14,7 @@ dbgBreakpointClass::breakpointMap dbgBreakpointClass::m_breakMap;
HRESULT dbgBreakpointClass::onBreakpointEvnet( IDebugBreakpoint* bp )
{
PyThread_StateSave( dbgExt->getThreadState() );
PyThread_StateSave pyThrdState( dbgExt->getThreadState() );
try {
......
......@@ -69,8 +69,8 @@ HRESULT debugEvent::LoadModule(
dbgModuleClass module(moduleName, moduleBase, moduleSize);
silentMode.reset();
PyThread_StateSave( dbgExt->getThreadState() );
PyThread_StateSave pyThrdState( dbgExt->getThreadState() );
return onLoadModule( module );
}
......@@ -91,8 +91,8 @@ HRESULT debugEvent::UnloadModule(
dbgModuleClass module(moduleName, moduleBase, moduleSize);
silentMode.reset();
PyThread_StateSave( dbgExt->getThreadState() );
PyThread_StateSave pyThrdState( dbgExt->getThreadState() );
return onUnloadModule( module );
}
......@@ -102,7 +102,7 @@ HRESULT debugEvent::SessionStatus(
__in ULONG Status
)
{
PyThread_StateSave( dbgExt->getThreadState() );
PyThread_StateSave pyThrdState( dbgExt->getThreadState() );
return onChangeSessionStatus( Status );
}
......@@ -114,10 +114,10 @@ HRESULT debugEvent::ChangeDebuggeeState(
__in ULONG64 Argument
)
{
PyThread_StateSave( dbgExt->getThreadState() );
PyThread_StateSave pyThrdState( dbgExt->getThreadState() );
return onChangeDebugeeState();
}
///////////////////////////////////////////////////////////////////////////////////
......@@ -249,7 +249,7 @@ BOOST_PYTHON_MODULE( pykd )
DEF_PY_GLOBAL( "ulong_t", TypeInfo("", "unsigned long") );
DEF_PY_GLOBAL( "int_t", TypeInfo("", "int") );
DEF_PY_GLOBAL( "uint_t", TypeInfo("", "unsigned int") );
DEF_PY_GLOBAL( "ptr_t", TypeInfo("", "viod*") );
DEF_PY_GLOBAL( "ptr_t", TypeInfo("", "void*") );
DEF_PY_GLOBAL( "double_t", TypeInfo("", "double") );
DEF_PY_GLOBAL( "longlong_t", TypeInfo("", "int64") );
DEF_PY_GLOBAL( "ulonglong_t", TypeInfo("", "unsigned int64") );
......@@ -702,10 +702,9 @@ DebugExtensionUninitialize()
WindbgGlobalSession::StopWindbgSession();
}
DbgExt::DbgExt( IDebugClient4 *masterClient )
DbgExt::DbgExt( IDebugClient4 *masterClient )
: m_threadState(NULL)
{
m_threadState = NULL;
client = NULL;
masterClient->QueryInterface( __uuidof(IDebugClient), (void **)&client );
......@@ -747,7 +746,7 @@ DbgExt::DbgExt( IDebugClient4 *masterClient )
system2 = NULL;
masterClient->QueryInterface( __uuidof(IDebugSystemObjects2), (void**)&system2 );
m_previosExt = dbgExt;
dbgExt = this;
}
......@@ -761,7 +760,7 @@ DbgExt::~DbgExt()
client4->Release();
if ( client5 )
client5->Release();
client5->Release();
if ( control )
control->Release();
......
......@@ -10,26 +10,26 @@ public:
IDebugClient *client;
IDebugClient4 *client4;
IDebugClient5 *client5;
IDebugControl *control;
IDebugControl4 *control4;
IDebugRegisters *registers;
IDebugSymbols *symbols;
IDebugSymbols2 *symbols2;
IDebugSymbols3 *symbols3;
IDebugDataSpaces *dataSpaces;
IDebugDataSpaces4 *dataSpaces4;
IDebugAdvanced2 *advanced2;
IDebugSystemObjects *system;
IDebugSystemObjects2 *system2;
DbgExt( IDebugClient4 *client );
DbgExt( IDebugClient4 *client );
~DbgExt();
PyThreadState**
......
......@@ -15,16 +15,19 @@ class PyThread_StateSave {
public:
PyThread_StateSave( PyThreadState **state ) {
PyThread_StateSave( PyThreadState **state )
: m_state(NULL)
{
if ( *state != NULL )
{
m_state = state;
m_state = state;
PyEval_RestoreThread( *m_state );
}
}
~PyThread_StateSave() {
*m_state =PyEval_SaveThread();
if (m_state)
*m_state =PyEval_SaveThread();
}
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment