pykd/pykd/dbgobj.h
SND\kernelnet_cp 2e787e1b57 [0.1.x] added : reg routine
[0.1.x] removed : cpuReg class


git-svn-id: https://pykd.svn.codeplex.com/svn@71752 9b283d60-5439-405e-af05-b73fd8c4d996
2017-11-08 17:06:26 +04:00

60 lines
1.9 KiB
C++

#pragma once
#include <dbgeng.h>
#include "dbgexcept.h"
namespace pykd {
///////////////////////////////////////////////////////////////////////////////////
class DbgObject {
protected:
DbgObject( IDebugClient4 *client ) {
m_client = client;
HRESULT hres;
hres = client->QueryInterface( __uuidof(IDebugClient5), (void **)&m_client5 );
if ( FAILED( hres ) )
throw DbgException("QueryInterface IDebugClient5 failed");
hres = client->QueryInterface( __uuidof(IDebugControl4), (void**)&m_control );
if ( FAILED( hres ) )
throw DbgException("QueryInterface IDebugControl4 failed");
hres = client->QueryInterface( __uuidof(IDebugSymbols3), (void**)&m_symbols );
if ( FAILED( hres ) )
throw DbgException("QueryInterface IDebugSymbols3 failed");
hres = client->QueryInterface( __uuidof(IDebugAdvanced2), (void**)&m_advanced );
if ( FAILED( hres ) )
throw DbgException("QueryInterface IDebugAdvanced2 failed");
hres = client->QueryInterface( __uuidof(IDebugDataSpaces), (void**)&m_dataSpaces );
if ( FAILED( hres ) )
throw DbgException("QueryInterface IDebugDataSpaces failed");
hres = client->QueryInterface( __uuidof(IDebugRegisters2), (void**)&m_registers );
if ( FAILED( hres ) )
throw DbgException("QueryInterface IDebugDataSpaces failed");
}
virtual ~DbgObject() {};
CComPtr<IDebugClient5> m_client5;
CComPtr<IDebugClient4> m_client;
CComPtr<IDebugControl4> m_control;
CComPtr<IDebugSymbols3> m_symbols;
CComPtr<IDebugAdvanced2> m_advanced;
CComPtr<IDebugDataSpaces> m_dataSpaces;
CComPtr<IDebugRegisters2> m_registers;
};
///////////////////////////////////////////////////////////////////////////////////
}; // end of namespace pykd