summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2019-08-19 20:03:36 (GMT)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>2019-08-21 12:56:20 (GMT)
commit639f67ccc9fbee9968f107cab897d1f4f1e3e509 (patch)
treee03bfb1d1a234d8e0aa5bfdc9ea51b48ce2084f2
parent4520b709b6150a751326bd8860491b84467c88ff (diff)
downloadcoreclr-sandbox/ches01/integrate-libasansi_debug_v2.zip
coreclr-sandbox/ches01/integrate-libasansi_debug_v2.tar.gz
coreclr-sandbox/ches01/integrate-libasansi_debug_v2.tar.bz2
Change-Id: Idc66ededc8e329737ed28b42e0f900be563166d0 Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
-rw-r--r--src/dlls/mscoree/unixinterface.cpp7
-rw-r--r--src/vm/arm/stubs.cpp4
-rw-r--r--src/vm/assemblyspec.cpp14
-rw-r--r--src/vm/clsload.cpp39
-rw-r--r--src/vm/corhost.cpp20
5 files changed, 75 insertions, 9 deletions
diff --git a/src/dlls/mscoree/unixinterface.cpp b/src/dlls/mscoree/unixinterface.cpp
index 67bd444..a66b160 100644
--- a/src/dlls/mscoree/unixinterface.cpp
+++ b/src/dlls/mscoree/unixinterface.cpp
@@ -19,6 +19,8 @@
#include "../../vm/gdbjithelpers.h"
#endif // FEATURE_GDBJIT
+extern "C" int dprintf(int fd, const char *format, ...);
+
typedef int (STDMETHODCALLTYPE *HostMain)(
const int argc,
const wchar_t** argv
@@ -362,13 +364,16 @@ int coreclr_create_delegate(
ConstWStringHolder entryPointTypeNameW = StringToUnicode(entryPointTypeName);
ConstWStringHolder entryPointMethodNameW = StringToUnicode(entryPointMethodName);
+ dprintf(1, "#### coreclr_create_delegate B: entryPointAssemblyName='%s' entryPointTypeName='%s' entryPointMethodName='%s'\n",
+ entryPointAssemblyName, entryPointTypeName, entryPointMethodName);
HRESULT hr = host->CreateDelegate(
domainId,
entryPointAssemblyNameW,
entryPointTypeNameW,
entryPointMethodNameW,
(INT_PTR*)delegate);
-
+
+ dprintf(1, "#### coreclr_create_delegate E: hr=%d\n", hr);
return hr;
}
diff --git a/src/vm/arm/stubs.cpp b/src/vm/arm/stubs.cpp
index b86732c..d64c108 100644
--- a/src/vm/arm/stubs.cpp
+++ b/src/vm/arm/stubs.cpp
@@ -30,6 +30,8 @@
#include <tizenasanenv.h>
#endif
+extern "C" int dprintf(int fd, const char *format, ...);
+
// target write barriers
EXTERN_C void JIT_WriteBarrier(Object **dst, Object *ref);
EXTERN_C void JIT_WriteBarrier_End();
@@ -2481,6 +2483,7 @@ class UMEntryThunk * UMEntryThunk::Decode(void *pCallback)
void UMEntryThunkCode::Encode(BYTE* pTargetCode, void* pvSecretParam)
{
+ dprintf(1, "#### UMEntryThunkCode::Encode B:\n");
#if defined(TIZEN_ASAN_ENVIRONMENT) && !defined(CROSS_COMPILE) && !defined(DACCESS_COMPILE)
pTargetCode = (BYTE *)TizenASanEnv::CreateWrapper((LPVOID)pTargetCode,
TizenASanEnv::PushAndDisableASan,
@@ -2498,6 +2501,7 @@ void UMEntryThunkCode::Encode(BYTE* pTargetCode, void* pvSecretParam)
m_pvSecretParam = (TADDR)pvSecretParam;
FlushInstructionCache(GetCurrentProcess(),&m_code,sizeof(m_code));
+ dprintf(1, "#### UMEntryThunkCode::Encode E:\n");
}
#ifndef DACCESS_COMPILE
diff --git a/src/vm/assemblyspec.cpp b/src/vm/assemblyspec.cpp
index 4057b00..8c23f23 100644
--- a/src/vm/assemblyspec.cpp
+++ b/src/vm/assemblyspec.cpp
@@ -29,6 +29,9 @@
#include "winrthelpers.h"
#endif
+
+extern "C" int dprintf(int fd, const char *format, ...);
+
#ifdef _DEBUG
// This debug-only wrapper for LookupAssembly is solely for the use of postconditions and
// assertions. The problem is that the real LookupAssembly can throw an OOM
@@ -753,13 +756,20 @@ Assembly *AssemblySpec::LoadAssembly(FileLoadLevel targetLevel, BOOL fThrowOnFil
MODE_ANY;
}
CONTRACTL_END;
-
+
+ dprintf(1, "AssemblySpec::LoadAssembly B:\n");
DomainAssembly * pDomainAssembly = LoadDomainAssembly(targetLevel, fThrowOnFileNotFound);
+ dprintf(1, "#### AssemblySpec::LoadAssembly == [%s +%d]\n", __FILE__, __LINE__);
if (pDomainAssembly == NULL) {
+ dprintf(1, "#### AssemblySpec::LoadAssembly == [%s +%d]\n", __FILE__, __LINE__);
_ASSERTE(!fThrowOnFileNotFound);
return NULL;
}
- return pDomainAssembly->GetAssembly();
+ dprintf(1, "#### AssemblySpec::LoadAssembly == [%s +%d]\n", __FILE__, __LINE__);
+ Assembly *ret = pDomainAssembly->GetAssembly();
+
+ dprintf(1, "AssemblySpec::LoadAssembly E: ret=%p\n", ret);
+ return ret;
}
// Returns a BOOL indicating if the two Binder references point to the same
diff --git a/src/vm/clsload.cpp b/src/vm/clsload.cpp
index ff4d0a0..9eccd5e 100644
--- a/src/vm/clsload.cpp
+++ b/src/vm/clsload.cpp
@@ -438,34 +438,63 @@ TypeHandle ClassLoader::LoadTypeByNameThrowing(Assembly *pAssembly,
ClassLoader::LoadTypesFlag fLoadTypes,
ClassLoadLevel level)
{
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing B\n");
CONTRACT(TypeHandle)
{
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
if (FORBIDGC_LOADER_USE_ENABLED()) NOTHROW; else THROWS;
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
if (FORBIDGC_LOADER_USE_ENABLED()) GC_NOTRIGGER; else GC_TRIGGERS;
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
if (FORBIDGC_LOADER_USE_ENABLED()) FORBID_FAULT; else { INJECT_FAULT(COMPlusThrowOM()); }
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
MODE_ANY;
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
if (FORBIDGC_LOADER_USE_ENABLED() || fLoadTypes != LoadTypes) { LOADS_TYPE(CLASS_LOAD_BEGIN); } else { LOADS_TYPE(level); }
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
PRECONDITION(CheckPointer(pAssembly));
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
PRECONDITION(level > CLASS_LOAD_BEGIN && level <= CLASS_LOADED);
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
POSTCONDITION(CheckPointer(RETVAL,
(fNotFound == ThrowIfNotFound && fLoadTypes == LoadTypes )? NULL_NOT_OK : NULL_OK));
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
POSTCONDITION(RETVAL.IsNull() || RETVAL.CheckLoadLevel(level));
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
SUPPORTS_DAC;
#ifdef DACCESS_COMPILE
PRECONDITION((fNotFound == ClassLoader::ReturnNullIfNotFound) && (fLoadTypes == DontLoadTypes));
#endif
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
}
CONTRACT_END
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
NameHandle nameHandle(nameSpace, name);
- if (fLoadTypes == DontLoadTypes)
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ if (fLoadTypes == DontLoadTypes) {
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
nameHandle.SetTokenNotToLoad(tdAllTypes);
- if (fNotFound == ThrowIfNotFound)
- RETURN pAssembly->GetLoader()->LoadTypeHandleThrowIfFailed(&nameHandle, level);
- else
- RETURN pAssembly->GetLoader()->LoadTypeHandleThrowing(&nameHandle, level);
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ }
+
+ TypeHandle ret;
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ if (fNotFound == ThrowIfNotFound) {
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ ret = pAssembly->GetLoader()->LoadTypeHandleThrowIfFailed(&nameHandle, level);
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ } else {
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ ret = pAssembly->GetLoader()->LoadTypeHandleThrowing(&nameHandle, level);
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing == [%s +%d]\n", __FILE__, __LINE__);
+ }
+
+ dprintf(1, "#### ClassLoader::LoadTypeByNameThrowing E: ret=%p\n", ret);
+
+ RETURN ret;
}
#ifndef DACCESS_COMPILE
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index be91820..c88a199 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -43,6 +43,7 @@
#include "winrttypenameconverter.h"
#endif
+extern "C" int dprintf(int fd, const char *format, ...);
GVAL_IMPL_INIT(DWORD, g_fHostConfig, 0);
@@ -801,7 +802,7 @@ HRESULT CorHost2::_CreateDelegate(
LPCWSTR wszMethodName,
INT_PTR* fnPtr)
{
-
+ dprintf(1, "#### CorHost2::_CreateDelegate B:\n");
CONTRACTL
{
NOTHROW;
@@ -829,10 +830,12 @@ HRESULT CorHost2::_CreateDelegate(
if(wszMethodName == NULL)
return E_INVALIDARG;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
// This is currently supported in default domain only
if (appDomainID != DefaultADID)
return HOST_E_INVALIDOPERATION;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
BEGIN_ENTRYPOINT_NOTHROW;
BEGIN_EXTERNAL_ENTRYPOINT(&hr);
@@ -845,39 +848,54 @@ HRESULT CorHost2::_CreateDelegate(
{
GCX_PREEMP();
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
AssemblySpec spec;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
spec.Init(szAssemblyName);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
Assembly* pAsm=spec.LoadAssembly(FILE_ACTIVE);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
TypeHandle th=pAsm->GetLoader()->LoadTypeByNameThrowing(pAsm,NULL,szClassName);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
MethodDesc* pMD=NULL;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
if (!th.IsTypeDesc())
{
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
pMD = MemberLoader::FindMethodByName(th.GetMethodTable(), szMethodName, MemberLoader::FM_Unique);
if (pMD == NULL)
{
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
// try again without the FM_Unique flag (error path)
pMD = MemberLoader::FindMethodByName(th.GetMethodTable(), szMethodName, MemberLoader::FM_Default);
if (pMD != NULL)
{
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
// the method exists but is overloaded
ThrowHR(COR_E_AMBIGUOUSMATCH);
}
}
}
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
if (pMD==NULL || !pMD->IsStatic() || pMD->ContainsGenericVariables())
ThrowHR(COR_E_MISSINGMETHOD);
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
UMEntryThunk *pUMEntryThunk = pMD->GetLoaderAllocator()->GetUMEntryThunkCache()->GetUMEntryThunk(pMD);
*fnPtr = (INT_PTR)pUMEntryThunk->GetCode();
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
}
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
END_EXTERNAL_ENTRYPOINT;
+ dprintf(1, "#### CorHost2::_CreateDelegate == [%s +%d]\n", __FILE__, __LINE__);
END_ENTRYPOINT_NOTHROW;
+ dprintf(1, "#### CorHost2::_CreateDelegate E: hr=%d\n", hr);
return hr;
}