mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[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:
parent
04d1224621
commit
09a5426933
39
pykd/pyevents.h
Normal file
39
pykd/pyevents.h
Normal 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
|
Loading…
Reference in New Issue
Block a user