// Suitable for non-debugging use.
const char* getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
const char** className, /* OUT */
- const char** namespaceName /* OUT */
+ const char** namespaceName, /* OUT */
+ const char** enclosingClassName /* OUT */
);
// this function is for debugging only. It returns a value that
LWM(GetMethodHash, DWORDLONG, DWORD)
LWM(GetMethodInfo, DWORDLONG, Agnostic_GetMethodInfo)
LWM(GetMethodName, DLD, DD)
-LWM(GetMethodNameFromMetadata, DLDD, DDD)
+LWM(GetMethodNameFromMetadata, Agnostic_CORINFO_METHODNAME_TOKENin, Agnostic_CORINFO_METHODNAME_TOKENout)
LWM(GetMethodSig, DLDL, Agnostic_CORINFO_SIG_INFO)
LWM(GetMethodSync, DWORDLONG, DLDL)
LWM(GetMethodVTableOffset, DWORDLONG, DDD)
void MethodContext::recGetMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
char* methodName,
const char** className,
- const char** namespaceName)
+ const char** namespaceName,
+ const char** enclosingClassName)
{
if (GetMethodNameFromMetadata == nullptr)
- GetMethodNameFromMetadata = new LightWeightMap<DLDD, DDD>();
- DDD value;
- DLDD key;
- key.A = (DWORDLONG)ftn;
- key.B = (className != nullptr);
- key.C = (namespaceName != nullptr);
+ GetMethodNameFromMetadata = new LightWeightMap<Agnostic_CORINFO_METHODNAME_TOKENin, Agnostic_CORINFO_METHODNAME_TOKENout>();
+ Agnostic_CORINFO_METHODNAME_TOKENout value;
+ Agnostic_CORINFO_METHODNAME_TOKENin key;
+ key.ftn = (DWORDLONG)ftn;
+ key.className = (className != nullptr);
+ key.namespaceName = (namespaceName != nullptr);
+ key.enclosingClassName = (enclosingClassName != nullptr);
if (methodName != nullptr)
- value.A = GetMethodNameFromMetadata->AddBuffer((unsigned char*)methodName, (DWORD)strlen(methodName) + 1);
+ value.methodName = GetMethodNameFromMetadata->AddBuffer((unsigned char*)methodName, (DWORD)strlen(methodName) + 1);
else
- value.A = (DWORD)-1;
+ value.methodName = (DWORD)-1;
if ((className != nullptr) && (*className != nullptr))
- value.B = GetMethodNameFromMetadata->AddBuffer((unsigned char*)*className, (DWORD)strlen(*className) + 1);
+ value.className = GetMethodNameFromMetadata->AddBuffer((unsigned char*)*className, (DWORD)strlen(*className) + 1);
else
- value.B = (DWORD)-1;
+ value.className = (DWORD)-1;
if ((namespaceName != nullptr) && (*namespaceName != nullptr))
- value.C =
+ value.namespaceName =
GetMethodNameFromMetadata->AddBuffer((unsigned char*)*namespaceName, (DWORD)strlen(*namespaceName) + 1);
else
- value.C = (DWORD)-1;
+ value.namespaceName = (DWORD)-1;
+
+ if ((enclosingClassName != nullptr) && (*enclosingClassName != nullptr))
+ value.enclosingClassName =
+ GetMethodNameFromMetadata->AddBuffer((unsigned char*)*enclosingClassName, (DWORD)strlen(*enclosingClassName) + 1);
+ else
+ value.enclosingClassName = (DWORD)-1;
GetMethodNameFromMetadata->Add(key, value);
DEBUG_REC(dmpGetMethodNameFromMetadata(key, value));
}
-void MethodContext::dmpGetMethodNameFromMetadata(DLDD key, DDD value)
+void MethodContext::dmpGetMethodNameFromMetadata(Agnostic_CORINFO_METHODNAME_TOKENin key, Agnostic_CORINFO_METHODNAME_TOKENout value)
{
- unsigned char* methodName = (unsigned char*)GetMethodName->GetBuffer(value.A);
- unsigned char* className = (unsigned char*)GetMethodName->GetBuffer(value.B);
- unsigned char* namespaceName = (unsigned char*)GetMethodName->GetBuffer(value.C);
- printf("GetMethodNameFromMetadata key - ftn-%016llX classNonNull-%u namespaceNonNull-%u, value meth-'%s', "
- "class-'%s', namespace-'%s'",
- key.A, key.B, key.C, methodName, className, namespaceName);
+ unsigned char* methodName = (unsigned char*)GetMethodName->GetBuffer(value.methodName);
+ unsigned char* className = (unsigned char*)GetMethodName->GetBuffer(value.className);
+ unsigned char* namespaceName = (unsigned char*)GetMethodName->GetBuffer(value.namespaceName);
+ unsigned char* enclosingClassName = (unsigned char*)GetMethodName->GetBuffer(value.enclosingClassName);
+ printf("GetMethodNameFromMetadata key - ftn-%016llX classNonNull-%u namespaceNonNull-%u nclosingClassNonNull-%u, value meth-'%s', "
+ "class-'%s', namespace-'%s' enclosingClass-'%s'",
+ key.ftn, key.className, key.namespaceName, key.enclosingClassName, methodName, className, namespaceName, enclosingClassName);
GetMethodNameFromMetadata->Unlock();
}
const char* MethodContext::repGetMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
const char** moduleName,
- const char** namespaceName)
+ const char** namespaceName,
+ const char** enclosingClassName)
{
const char* result = nullptr;
- DDD value;
- DLDD key;
- key.A = (DWORDLONG)ftn;
- key.B = (moduleName != nullptr);
- key.C = (namespaceName != nullptr);
+ Agnostic_CORINFO_METHODNAME_TOKENout value;
+ Agnostic_CORINFO_METHODNAME_TOKENin key;
+ key.ftn = (DWORDLONG)ftn;
+ key.className = (moduleName != nullptr);
+ key.namespaceName = (namespaceName != nullptr);
+ key.enclosingClassName = (enclosingClassName != nullptr);
int itemIndex = -1;
if (GetMethodNameFromMetadata != nullptr)
else
{
value = GetMethodNameFromMetadata->Get(key);
- result = (const char*)GetMethodNameFromMetadata->GetBuffer(value.A);
+ result = (const char*)GetMethodNameFromMetadata->GetBuffer(value.methodName);
if (moduleName != nullptr)
{
- *moduleName = (const char*)GetMethodNameFromMetadata->GetBuffer(value.B);
+ *moduleName = (const char*)GetMethodNameFromMetadata->GetBuffer(value.className);
}
if (namespaceName != nullptr)
{
- *namespaceName = (const char*)GetMethodNameFromMetadata->GetBuffer(value.C);
+ *namespaceName = (const char*)GetMethodNameFromMetadata->GetBuffer(value.namespaceName);
+ }
+
+ if (enclosingClassName != nullptr)
+ {
+ *enclosingClassName = (const char*)GetMethodNameFromMetadata->GetBuffer(value.enclosingClassName);
}
}
DEBUG_REP(dmpGetMethodNameFromMetadata(key, value));
DWORD B;
DWORD C;
};
+ struct Agnostic_CORINFO_METHODNAME_TOKENin
+ {
+ DWORDLONG ftn;
+ DWORD className;
+ DWORD namespaceName;
+ DWORD enclosingClassName;
+ };
+ struct Agnostic_CORINFO_METHODNAME_TOKENout
+ {
+ DWORD methodName;
+ DWORD className;
+ DWORD namespaceName;
+ DWORD enclosingClassName;
+ };
struct Agnostic_CORINFO_RESOLVED_TOKENin
{
DWORDLONG tokenContext;
void recGetMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
char* methodname,
const char** moduleName,
- const char** namespaceName);
- void dmpGetMethodNameFromMetadata(DLDD key, DDD value);
+ const char** namespaceName,
+ const char** enclosingClassName);
+ void dmpGetMethodNameFromMetadata(Agnostic_CORINFO_METHODNAME_TOKENin key, Agnostic_CORINFO_METHODNAME_TOKENout value);
const char* repGetMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
const char** className,
- const char** namespaceName);
+ const char** namespaceName,
+ const char** enclosingClassName);
void recGetJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes, DWORD result);
void dmpGetJitFlags(DWORD key, DD value);
return temp;
}
-const char* interceptor_ICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
- const char** className, /* OUT */
- const char** namespaceName /* OUT */
+const char* interceptor_ICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
+ const char** className, /* OUT */
+ const char** namespaceName, /* OUT */
+ const char** enclosingClassName /* OUT */
)
{
mc->cr->AddCall("getMethodNameFromMetadata");
- const char* temp = original_ICorJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName);
- mc->recGetMethodNameFromMetadata(ftn, (char*)temp, className, namespaceName);
+ const char* temp = original_ICorJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName, enclosingClassName);
+ mc->recGetMethodNameFromMetadata(ftn, (char*)temp, className, namespaceName, enclosingClassName);
return temp;
}
return original_ICorJitInfo->getMethodName(ftn, moduleName);
}
-const char* interceptor_ICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
- const char** className, /* OUT */
- const char** namespaceName /* OUT */
+const char* interceptor_ICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
+ const char** className, /* OUT */
+ const char** namespaceName, /* OUT */
+ const char** enclosingClassName /* OUT */
)
{
mcs->AddCall("getMethodNameFromMetadata");
- return original_ICorJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName);
+ return original_ICorJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName, enclosingClassName);
}
// this function is for debugging only. It returns a value that
return original_ICorJitInfo->getMethodName(ftn, moduleName);
}
-const char* interceptor_ICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
- const char** className, /* OUT */
- const char** namespaceName /* OUT */
+const char* interceptor_ICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
+ const char** className, /* OUT */
+ const char** namespaceName, /* OUT */
+ const char** enclosingClassName /* OUT */
)
{
- return original_ICorJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName);
+ return original_ICorJitInfo->getMethodNameFromMetadata(ftn, className, namespaceName, enclosingClassName);
}
// this function is for debugging only. It returns a value that
return jitInstance->mc->repGetMethodName(ftn, moduleName);
}
-const char* MyICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
- const char** className, /* OUT */
- const char** namespaceName /* OUT */
+const char* MyICJI::getMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn, /* IN */
+ const char** className, /* OUT */
+ const char** namespaceName, /* OUT */
+ const char** enclosingClassName /* OUT */
)
{
jitInstance->mc->cr->AddCall("getMethodNameFromMetadata");
- return jitInstance->mc->repGetMethodNameFromMetadata(ftn, className, namespaceName);
+ return jitInstance->mc->repGetMethodNameFromMetadata(ftn, className, namespaceName, enclosingClassName);
}
// this function is for debugging only. It returns a value that