mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[~] using sumbols for testing release
git-svn-id: https://pykd.svn.codeplex.com/svn@69992 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
4cf5bca175
commit
0320bfce38
@ -15,7 +15,7 @@ const std::string Exception::descPrefix("pyDia: ");
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define callSymbol(method) \
|
#define callSymbol(method) \
|
||||||
callSymbolT( &IDiaSymbol::##method, __FUNCTION__, #method)
|
callSymbolT( &IDiaSymbol::##method, #method)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -186,7 +186,6 @@ protected:
|
|||||||
template <typename TRet>
|
template <typename TRet>
|
||||||
TRet callSymbolT(
|
TRet callSymbolT(
|
||||||
HRESULT(STDMETHODCALLTYPE IDiaSymbol::*method)(TRet *),
|
HRESULT(STDMETHODCALLTYPE IDiaSymbol::*method)(TRet *),
|
||||||
const char *funcName,
|
|
||||||
const char *methodName
|
const char *methodName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
10
pykd/utils.h
10
pykd/utils.h
@ -12,7 +12,13 @@ public:
|
|||||||
toWStr(const std::string &sz)
|
toWStr(const std::string &sz)
|
||||||
{
|
{
|
||||||
m_buf.resize( sz.size() + 1, L'\0' );
|
m_buf.resize( sz.size() + 1, L'\0' );
|
||||||
::MultiByteToWideChar( CP_ACP, 0, sz.c_str(), sz.size(), &m_buf[0], m_buf.size() );
|
::MultiByteToWideChar(
|
||||||
|
CP_ACP,
|
||||||
|
0,
|
||||||
|
sz.c_str(),
|
||||||
|
static_cast<int>( sz.size() ),
|
||||||
|
&m_buf[0],
|
||||||
|
static_cast<int>( m_buf.size() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
operator const WCHAR *() const {
|
operator const WCHAR *() const {
|
||||||
@ -70,7 +76,7 @@ public:
|
|||||||
bstr,
|
bstr,
|
||||||
chars,
|
chars,
|
||||||
&ret[0],
|
&ret[0],
|
||||||
ret.size(),
|
static_cast<int>(ret.size()),
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -65,16 +65,28 @@ void FuncWithName0()
|
|||||||
_classChild.baseMethod();
|
_classChild.baseMethod();
|
||||||
|
|
||||||
reinterpret_cast<classChild *>(&_classChild)->virtFunc2();
|
reinterpret_cast<classChild *>(&_classChild)->virtFunc2();
|
||||||
|
std::cout << _classChild.m_childField2;
|
||||||
|
std::cout << g_constNumValue;
|
||||||
|
std::cout << g_constBoolValue;
|
||||||
|
std::cout << g_ucharValue;
|
||||||
|
std::cout << g_ushortValue;
|
||||||
|
std::cout << g_ulongValue;
|
||||||
|
std::cout << g_ulonglongValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FuncWithName1(int a)
|
void FuncWithName1(int a)
|
||||||
{
|
{
|
||||||
unionTest _unionTest[2];
|
unionTest _unionTest[2] = {0};
|
||||||
_unionTest[1].m_value = 0;
|
_unionTest[1].m_value = 0;
|
||||||
structTest _structTest;
|
structTest _structTest;
|
||||||
_structTest.m_field1 = a;
|
_structTest.m_field1 = a;
|
||||||
struct2 _struct2;
|
struct2 _struct2;
|
||||||
RtlZeroMemory(&_struct2, sizeof(_struct2));
|
RtlZeroMemory(&_struct2, sizeof(_struct2));
|
||||||
|
|
||||||
|
std::cout << _unionTest[0].m_value;
|
||||||
|
std::cout << _structTest.m_field1;
|
||||||
|
std::cout << _struct2.m_struct.m_field1;
|
||||||
|
std::cout << g_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _tmain(int argc, _TCHAR* argv[])
|
int _tmain(int argc, _TCHAR* argv[])
|
||||||
|
Loading…
Reference in New Issue
Block a user