本文整理汇总了C++中MethodDesc::GetMemberDef方法的典型用法代码示例。如果您正苦于以下问题:C++ MethodDesc::GetMemberDef方法的具体用法?C++ MethodDesc::GetMemberDef怎么用?C++ MethodDesc::GetMemberDef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MethodDesc
的用法示例。
在下文中一共展示了MethodDesc::GetMemberDef方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: THROWSCOMPLUSEXCEPTION
MethodDesc *Binder::LookupMethod(BinderMethodID id)
{
_ASSERTE(m_pModule != NULL);
_ASSERTE(id != METHOD__NIL);
_ASSERTE(id <= m_cMethodRIDs);
THROWSCOMPLUSEXCEPTION();
const MethodDescription *d = m_methodDescriptions + id - 1;
MethodTable *pMT = FetchClass(d->classID);
MethodDesc *pMD = pMT->GetClass()->FindMethod(d->name, d->sig);
_ASSERTE(pMD != NULL || !"EE expects method to exist");
_ASSERTE(pMD->GetSlot()+1 <= USHRT_MAX);
m_pMethodRIDs[id-1] = (USHORT) pMD->GetSlot()+1;
// Go ahead and fill in the rid map since we're here anyway
m_pModule->StoreMethodDef(pMD->GetMemberDef(), pMD);
return pMD;
}
示例2: TraceAndSendStackCallback
//.........这里部分代码省略.........
&(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);