mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[~] fix: processing debug events exception
git-svn-id: https://pykd.svn.codeplex.com/svn@69473 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
e4bbc369f9
commit
105ba17ade
@ -25,7 +25,7 @@ setExecutionStatus()
|
|||||||
do {
|
do {
|
||||||
|
|
||||||
{
|
{
|
||||||
PyThread_StateRestore state;
|
PyThread_StateRestore state(dbgExt->getThreadState());
|
||||||
|
|
||||||
hres = dbgExt->control->WaitForEvent( 0, INFINITE );
|
hres = dbgExt->control->WaitForEvent( 0, INFINITE );
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
PyThread_StateSave( PyThreadState **state )
|
PyThread_StateSave( PyThreadState **state )
|
||||||
: m_state(NULL)
|
: m_state(NULL)
|
||||||
{
|
{
|
||||||
if ( *state != NULL )
|
if ( *state )
|
||||||
{
|
{
|
||||||
m_state = state;
|
m_state = state;
|
||||||
PyEval_RestoreThread( *m_state );
|
PyEval_RestoreThread( *m_state );
|
||||||
@ -26,7 +26,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~PyThread_StateSave() {
|
~PyThread_StateSave() {
|
||||||
if (m_state)
|
if ( m_state )
|
||||||
*m_state =PyEval_SaveThread();
|
*m_state =PyEval_SaveThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyThread_StateRestore( PyThreadState **state ) {
|
PyThread_StateRestore( PyThreadState **state ) {
|
||||||
if ( *state != NULL )
|
if ( *state )
|
||||||
{
|
{
|
||||||
m_state = state;
|
m_state = state;
|
||||||
*m_state =PyEval_SaveThread();
|
*m_state =PyEval_SaveThread();
|
||||||
@ -57,6 +57,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~PyThread_StateRestore() {
|
~PyThread_StateRestore() {
|
||||||
|
if (*m_state)
|
||||||
PyEval_RestoreThread( *m_state );
|
PyEval_RestoreThread( *m_state );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user