mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 11:53:23 +08:00
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "kdlib/dbgengine.h"
|
|
#include "kdlib/eventhandler.h"
|
|
|
|
#include "boost/shared_ptr.hpp"
|
|
#include "boost/noncopyable.hpp"
|
|
#include "boost/python/object.hpp"
|
|
#include "boost/python/wrapper.hpp"
|
|
|
|
namespace python = boost::python;
|
|
|
|
namespace pykd {
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
class Breakpoint;
|
|
typedef boost::shared_ptr<Breakpoint> BreakpointPtr;
|
|
|
|
class Breakpoint : public boost::noncopyable
|
|
{
|
|
|
|
public:
|
|
|
|
static
|
|
BreakpointPtr setSoftwareBreakpoint( kdlib::MEMOFFSET_64 offset, python::object &callback = python::object() );
|
|
|
|
protected:
|
|
|
|
virtual ~Breakpoint() {}
|
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
class EventHandler;
|
|
typedef boost::shared_ptr<EventHandler> EventHandlerPtr;
|
|
|
|
class EventHandler : public python::wrapper<kdlib::EventHandler>, public kdlib::EventHandler
|
|
{
|
|
public:
|
|
|
|
EventHandler();
|
|
|
|
virtual kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId );
|
|
|
|
private:
|
|
|
|
PyThreadState* m_pystate;
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
} // end namespace pykd
|