本文整理汇总了C++中MethodDesc::GetClass方法的典型用法代码示例。如果您正苦于以下问题:C++ MethodDesc::GetClass方法的具体用法?C++ MethodDesc::GetClass怎么用?C++ MethodDesc::GetClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MethodDesc
的用法示例。
在下文中一共展示了MethodDesc::GetClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TraceAndSendStackCallback
//.........这里部分代码省略.........
&(currentFuncData->rpSig),
&(currentFuncData->cbSig),
&(currentFuncData->rpFirstArg),
fd,
rd,
pInfo->relOffset);
LOG((LF_CORDB, LL_INFO10000, "DT::TASSC: good frame for %s::%s\n",
fd->m_pszDebugClassName,
fd->m_pszDebugMethodName));
//
// Fill in information about the function that goes with this
// frame.
//
currentFuncData->funcRVA = g_pEEInterface->MethodDescGetRVA(fd);
_ASSERTE (t != NULL);
Module *pRuntimeModule = g_pEEInterface->MethodDescGetModule(fd);
AppDomain *pAppDomain = pInfo->currentAppDomain;
currentFuncData->funcDebuggerModuleToken = (void*) g_pDebugger->LookupModule(pRuntimeModule, pAppDomain);
if (currentFuncData->funcDebuggerModuleToken == NULL && rsfd->iWhich == IPC_TARGET_INPROC)
{
currentFuncData->funcDebuggerModuleToken = (void*)g_pDebugger->AddDebuggerModule(pRuntimeModule, pAppDomain);
LOG((LF_CORDB, LL_INFO100, "DT::TASSC: load module Mod:%#08x AD:%#08x isDynamic:%#x runtimeMod:%#08x\n",
currentFuncData->funcDebuggerModuleToken, pAppDomain, pRuntimeModule->IsReflection(), pRuntimeModule));
}
_ASSERTE(currentFuncData->funcDebuggerModuleToken != 0);
currentFuncData->funcDebuggerAssemblyToken =
(g_pEEInterface->MethodDescGetModule(fd))->GetClassLoader()->GetAssembly();
currentFuncData->funcMetadataToken = fd->GetMemberDef();
currentFuncData->classMetadataToken = fd->GetClass()->GetCl();
// Pass back the local var signature token.
COR_ILMETHOD *CorILM = g_pEEInterface->MethodDescGetILHeader(fd);
if (CorILM == NULL )
{
currentFuncData->localVarSigToken = mdSignatureNil;
currentFuncData->ilStartAddress = NULL;
currentFuncData->ilSize = 0;
rsfd->currentSTRData->v.ILIP = NULL;
currentFuncData->nativeStartAddressPtr = NULL;
currentFuncData->nativeSize = 0;
currentFuncData->nativenVersion = DebuggerJitInfo::DJI_VERSION_FIRST_VALID;
}
else
{
COR_ILMETHOD_DECODER ILHeader(CorILM);
if (ILHeader.GetLocalVarSigTok() != 0)
currentFuncData->localVarSigToken = ILHeader.GetLocalVarSigTok();
else
currentFuncData->localVarSigToken = mdSignatureNil;
//
//
currentFuncData->ilStartAddress = const_cast<BYTE*>(ILHeader.Code);
currentFuncData->ilSize = ILHeader.GetCodeSize();
currentFuncData->ilnVersion = g_pDebugger->GetVersionNumber(fd);
示例2: CallDescrWithObjectArray
//.........这里部分代码省略.........
EEClass *pClass = NULL;
CorElementType brType = sig->GetByRefType(&pClass);
if (CorIsPrimitiveType(brType))
{
pArgInfo->dataSize = gElementTypeInfo[brType].m_cbSize;
}
else if (pClass->IsValueClass())
{
pArgInfo->dataSize = pClass->GetAlignedNumInstanceFieldBytes();
numByRef ++;
}
else
{
pArgInfo->dataSize = sizeof(Object *);
numByRef ++;
}
ByRefInfo *brInfo = (ByRefInfo *) _alloca(offsetof(ByRefInfo,data) + pArgInfo->dataSize);
brInfo->argIndex = arg;
brInfo->typ = brType;
brInfo->pClass = pClass;
brInfo->pNext = pByRefs;
pByRefs = brInfo;
pArgInfo->dataLocation = (BYTE*)brInfo->data;
*((void**)(pFrameBase + ofs)) = (void*)pArgInfo->dataLocation;
pArgInfo->dataClass = pClass;
pArgInfo->dataType = brType;
pArgInfo->byref = TRUE;
}
else
{
pArgInfo->dataLocation = pFrameBase + ofs;
pArgInfo->dataSize = StackElemSize(structSize);
pArgInfo->dataClass = sig->GetTypeHandle().GetClass(); // this may cause GC!
pArgInfo->dataType = typ;
pArgInfo->byref = FALSE;
}
}
if (!fIsStatic) {
// If this isn't a value class, verify the objectref
#ifdef _DEBUG
if (pMD->GetClass()->IsValueClass() == FALSE)
{
VALIDATEOBJECTREF(pServer);
}
#endif //_DEBUG
*ppThis = pServer;
}
// There should be no GC when we fill up the stack with parameters, as we don't protect them
// Assignment of "*ppThis" above triggers the point where we become unprotected.
BEGINFORBIDGC();
// reset pArgInfo to point to the start of the block we _alloca-ed
pArgInfo = pArgInfo-nFixedArgs;
PBYTE dataLocation;
INT32 dataSize;
EEClass *dataClass;
BYTE dataType;
OBJECTREF* pArguments = pArgArray->m_Array;
UINT32 i, j = arg;
for (i=0; i<j; i++)