[0.3.x] fixed : added forgotten file

git-svn-id: https://pykd.svn.codeplex.com/svn@87158 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2014-01-27 05:49:52 +00:00 committed by Mikhail I. Izmestev
parent 04d1224621
commit 09a5426933

39
pykd/pyevents.h Normal file
View File

@ -0,0 +1,39 @@
#pragma once
#include "kdlib/dbgengine.h"
#include "pythreadstate.h"
namespace pykd {
///////////////////////////////////////////////////////////////////////////////
struct DebugEvent
{
kdlib::EventType eventType;
kdlib::PROCESS_DEBUG_ID process;
kdlib::THREAD_DEBUG_ID thread;
};
inline DebugEvent getLastEvent()
{
AutoRestorePyState pystate;
kdlib::EventType eventType = kdlib::getLastEventType();
kdlib::PROCESS_DEBUG_ID processId = kdlib::getLastEventProcessId();
kdlib::THREAD_DEBUG_ID threadId = kdlib::getLastEventThreadId();
DebugEvent ev = { eventType, processId, threadId };
return ev;
}
inline kdlib::ExceptionInfo getLastException()
{
AutoRestorePyState pystate;
return kdlib::getLastException();
}
///////////////////////////////////////////////////////////////////////////////
} // pykd namespace