当前位置: 首页>>代码示例>>C++>>正文


C++ MethodDesc::GetMemberDef方法代码示例

本文整理汇总了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;
}
开发者ID:ArildF,项目名称:masters,代码行数:24,代码来源:binder.cpp

示例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);
开发者ID:ArildF,项目名称:masters,代码行数:66,代码来源:thread.cpp


注:本文中的MethodDesc::GetMemberDef方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。