mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.2.x] fixed : issue #11643 ( setBp does not work in standalone script ( out of windbg ) )
git-svn-id: https://pykd.svn.codeplex.com/svn@83040 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
b7c23b4aa3
commit
429c7fd8a9
@ -6,6 +6,7 @@
|
||||
#include "win/dbgeng.h"
|
||||
#include "win/dbgio.h"
|
||||
#include "dbgexcept.h"
|
||||
#include "eventhandler.h"
|
||||
|
||||
namespace pykd {
|
||||
|
||||
@ -1542,6 +1543,32 @@ HRESULT STDMETHODCALLTYPE DebugEngine::ChangeEngineState(
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DebugEngine::DbgEngBind* DebugEngine::operator->()
|
||||
{
|
||||
if ( m_bind.get() != NULL )
|
||||
return m_bind.get();
|
||||
|
||||
CComPtr<IDebugClient4> client = NULL;
|
||||
|
||||
HRESULT hres = DebugCreate( __uuidof(IDebugClient4), (void **)&client );
|
||||
if ( FAILED( hres ) )
|
||||
throw DbgException("DebugCreate failed");
|
||||
|
||||
m_bind.reset(new DbgEngBind(client, this) );
|
||||
|
||||
python::object main = boost::python::import("__main__");
|
||||
|
||||
python::object main_namespace = main.attr("__dict__");
|
||||
|
||||
python::object pykd = boost::python::import( "pykd" );
|
||||
|
||||
main_namespace["globalEventHandler"] = EventHandlerPtr( new EventHandlerImpl() );
|
||||
|
||||
return m_bind.get();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ULONG64
|
||||
getCurrentProcess()
|
||||
{
|
||||
|
@ -84,22 +84,21 @@ public:
|
||||
__in ULONG Flags,
|
||||
__in ULONG64 Argument );
|
||||
|
||||
DbgEngBind*
|
||||
operator->()
|
||||
{
|
||||
if ( m_bind.get() != NULL )
|
||||
return m_bind.get();
|
||||
DbgEngBind* operator->();
|
||||
//{
|
||||
// if ( m_bind.get() != NULL )
|
||||
// return m_bind.get();
|
||||
|
||||
CComPtr<IDebugClient4> client = NULL;
|
||||
// CComPtr<IDebugClient4> client = NULL;
|
||||
|
||||
HRESULT hres = DebugCreate( __uuidof(IDebugClient4), (void **)&client );
|
||||
if ( FAILED( hres ) )
|
||||
throw DbgException("DebugCreate failed");
|
||||
// HRESULT hres = DebugCreate( __uuidof(IDebugClient4), (void **)&client );
|
||||
// if ( FAILED( hres ) )
|
||||
// throw DbgException("DebugCreate failed");
|
||||
|
||||
m_bind.reset(new DbgEngBind(client, this) );
|
||||
// m_bind.reset(new DbgEngBind(client, this) );
|
||||
|
||||
return m_bind.get();
|
||||
}
|
||||
// return m_bind.get();
|
||||
//}
|
||||
|
||||
void registerCallbacks( const DEBUG_EVENT_CALLBACK *callbacks );
|
||||
void removeCallbacks( const DEBUG_EVENT_CALLBACK *callbacks );
|
||||
|
Loading…
Reference in New Issue
Block a user