diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index aaa8d500ccf1a999aaa0c92eb327547adee1ee46..aae0d66a699dd1c32dc734f6a5ff8f3b812c3c52 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -231,9 +231,6 @@ if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES) endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) -if(WIN32) - add_compile_definitions($<$>>:FEATURE_VERSIONING_LOG>) -endif(WIN32) if(NOT CLR_CMAKE_PLATFORM_UNIX) add_definitions(-DFEATURE_WIN32_REGISTRY) endif(NOT CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/coreclr/src/binder/CMakeLists.txt b/src/coreclr/src/binder/CMakeLists.txt index ee6a00f1573818b0d086d1b54262d589eee5436c..7c2618270cafb6f1f625ac19669de4894c5415bb 100644 --- a/src/coreclr/src/binder/CMakeLists.txt +++ b/src/coreclr/src/binder/CMakeLists.txt @@ -9,9 +9,7 @@ set(BINDER_COMMON_SOURCES assemblybinder.cpp assemblyidentitycache.cpp assemblyname.cpp - bindinglog.cpp bindertracing.cpp - cdebuglog.cpp clrprivbindercoreclr.cpp coreclrbindercommon.cpp failurecache.cpp @@ -38,18 +36,14 @@ set(BINDER_COMMON_HEADERS inc/assemblyversion.inl inc/bindertypes.hpp inc/bindertracing.h - inc/bindinglog.hpp - inc/bindinglog.inl inc/bindresult.hpp inc/bindresult.inl - inc/cdebuglog.hpp inc/clrprivbindercoreclr.h inc/coreclrbindercommon.h inc/failurecache.hpp inc/failurecachehashtraits.hpp inc/fusionassemblyname.hpp inc/fusionhelpers.hpp - inc/list.hpp inc/loadcontext.hpp inc/loadcontext.inl inc/stringlexer.hpp diff --git a/src/coreclr/src/binder/assemblybinder.cpp b/src/coreclr/src/binder/assemblybinder.cpp index 5300f4197f80789bdd4f0f1dc90be785dbe44173..207d70e2f5c6e1abf92f28c3efa8c71201ae5483 100644 --- a/src/coreclr/src/binder/assemblybinder.cpp +++ b/src/coreclr/src/binder/assemblybinder.cpp @@ -20,17 +20,11 @@ #include "loadcontext.hpp" #include "bindresult.inl" #include "failurecache.hpp" -#ifdef FEATURE_VERSIONING_LOG -#include "bindinglog.hpp" -#endif // FEATURE_VERSIONING_LOG #include "utils.hpp" #include "variables.hpp" #include "stringarraylist.h" #include "strongname.h" -#ifdef FEATURE_VERSIONING_LOG -#include "../dlls/mscorrc/fusres.h" -#endif // FEATURE_VERSIONING_LOG #define APP_DOMAIN_LOCKED_UNLOCKED 0x02 #define APP_DOMAIN_LOCKED_CONTEXT 0x04 @@ -183,150 +177,6 @@ namespace BINDER_SPACE return hr; } - -#ifdef FEATURE_VERSIONING_LOG - // - // This function outputs the current binding result - // and flushes the bind log. - // - HRESULT LogBindResult(ApplicationContext *pApplicationContext, - HRESULT hrLog, - BindResult *pBindResult) - { - HRESULT hr = S_OK; - BindingLog *pBindingLog = pApplicationContext->GetBindingLog(); - - if (!pBindingLog->CanLog()) - { - // For non-logging, return the bind result - hr = hrLog; - goto Exit; - } - - IF_FAIL_GO(pBindingLog->LogHR(hrLog)); - - if ((hrLog == S_OK) && pBindResult->HaveResult()) - { - IF_FAIL_GO(pBindingLog->LogResult(pBindResult)); - } - - IF_FAIL_GO(pBindingLog->Flush()); - - // For failure-free logging, return the bind result - hr = hrLog; - - Exit: - // SilverLight does not propagate binding log; therefore kill the information here. - pApplicationContext->ClearBindingLog(); - return hr; - } - - HRESULT LogAppDomainLocked(ApplicationContext *pApplicationContext, - DWORD dwLockedReason, - AssemblyName *pAssemblyName = NULL) - { - HRESULT hr = S_OK; - BindingLog *pBindingLog = pApplicationContext->GetBindingLog(); - - if (pBindingLog->CanLog()) - { - PathString info; - PathString format; - - switch (dwLockedReason) - { - case APP_DOMAIN_LOCKED_UNLOCKED: - { - IF_FAIL_GO(info. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_LOCKED_UNLOCKED)); - } - break; - case APP_DOMAIN_LOCKED_CONTEXT: - { - PathString displayName; - - _ASSERTE(pAssemblyName != NULL); - - IF_FAIL_GO(format. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_LOCKED_ASSEMBLY_EXE_CONTEXT)); - - pAssemblyName->GetDisplayName(displayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE); - - info.Printf(format.GetUnicode(), displayName.GetUnicode()); - } - break; - default: - _ASSERTE(0); - IF_FAIL_GO(E_INVALIDARG); - break; - } - - IF_FAIL_GO(pBindingLog->Log(info)); - } - - Exit: - return hr; - } - - HRESULT LogAssemblyNameWhereRef(ApplicationContext *pApplicationContext, - Assembly *pAssembly) - { - HRESULT hr = S_OK; - BindingLog *pBindingLog = pApplicationContext->GetBindingLog(); - - if (pBindingLog->CanLog()) - { - PathString info; - - IF_FAIL_GO(info. - LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_LOG_WHERE_REF_NAME)); - IF_FAIL_GO(pBindingLog->LogAssemblyName(info.GetUnicode(), - pAssembly->GetAssemblyName())); - } - - Exit: - return hr; - } - - HRESULT LogConfigurationError(ApplicationContext *pApplicationContext, - AssemblyName *pCulturedManifestName, - AssemblyName *pLocalPathAssemblyName) - { - HRESULT hr = S_OK; - BindingLog *pBindingLog = pApplicationContext->GetBindingLog(); - - if (pBindingLog->CanLog()) - { - PathString tmp; - PathString culturedManifestDisplayName; - PathString localPathDisplayName; - PathString info; - - IF_FAIL_GO(tmp. - LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_LOG_ERRONOUS_MANIFEST_ENTRY)); - - pCulturedManifestName->GetDisplayName(culturedManifestDisplayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE); - pLocalPathAssemblyName->GetDisplayName(localPathDisplayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE); - - info.Printf(tmp.GetUnicode(), - culturedManifestDisplayName.GetUnicode(), - localPathDisplayName.GetUnicode()); - IF_FAIL_GO(pBindingLog->Log(info.GetUnicode())); - } - - Exit: - return hr; - } -#endif // FEATURE_VERSIONING_LOG - #ifndef CROSSGEN_COMPILE HRESULT CreateImageAssembly(IMDInternalImport *pIMetaDataAssemblyImport, PEKIND PeKind, @@ -462,14 +312,6 @@ namespace BINDER_SPACE if (szCodeBase == NULL) { -#ifdef FEATURE_VERSIONING_LOG - // Log bind - IF_FAIL_GO(BindingLog::CreateInContext(pApplicationContext, - pAssemblyName, - pParentAssembly)); -#endif // FEATURE_VERSIONING_LOG - - IF_FAIL_GO(BindByName(pApplicationContext, pAssemblyName, false, // skipFailureCaching @@ -481,13 +323,6 @@ namespace BINDER_SPACE { PathString assemblyPath(szCodeBase); -#ifdef FEATURE_VERSIONING_LOG - // Log bind - IF_FAIL_GO(BindingLog::CreateInContext(pApplicationContext, - assemblyPath, - pParentAssembly)); -#endif // FEATURE_VERSIONING_LOG - // Convert URL to full path and block HTTP downloads IF_FAIL_GO(URLToFullPath(assemblyPath)); BOOL fDoNgenExplicitBind = fNgenExplicitBind; @@ -509,17 +344,11 @@ namespace BINDER_SPACE // Remember the post-bind version kContextVersion = pApplicationContext->GetVersion(); - Exit: -#ifdef FEATURE_VERSIONING_LOG - hr = LogBindResult(pApplicationContext, hr, &bindResult); -#else // FEATURE_VERSIONING_LOG - ; -#endif // FEATURE_VERSIONING_LOG - #ifndef CROSSGEN_COMPILE } // lock(pApplicationContext) #endif + Exit: if (bindResult.HaveResult()) { @@ -739,9 +568,6 @@ namespace BINDER_SPACE // this TRUE. fExplicitBindToNativeImage, &pAssembly)); -#ifdef FEATURE_VERSIONING_LOG - IF_FAIL_GO(LogAssemblyNameWhereRef(pApplicationContext, pAssembly)); -#endif // FEATURE_VERSIONING_LOG AssemblyName *pAssemblyName; pAssemblyName = pAssembly->GetAssemblyName(); @@ -842,16 +668,6 @@ namespace BINDER_SPACE if (pContextEntry != NULL) { AssemblyName *pContextName = pContextEntry->GetAssemblyName(); - -#ifdef FEATURE_VERSIONING_LOG - // First-time requests are considered unlocked, everything else is locked - DWORD dwLockedReason = (pContextEntry->GetIsFirstRequest() ? - APP_DOMAIN_LOCKED_UNLOCKED : APP_DOMAIN_LOCKED_CONTEXT); - - IF_FAIL_GO(LogAppDomainLocked(pApplicationContext, dwLockedReason, pContextName)); - pContextEntry->SetIsFirstRequest(FALSE); -#endif // FEATURE_VERSIONING_LOG - if (pAssemblyName->GetIsDefinition() && (pContextName->GetArchitecture() != pAssemblyName->GetArchitecture())) { @@ -937,13 +753,6 @@ namespace BINDER_SPACE GO_WITH_HRESULT(S_OK); } -#ifdef FEATURE_VERSIONING_LOG - // Log the candidates we throw out for diagnostics - IF_FAIL_GO(LogConfigurationError(pApplicationContext, - pRequestedAssemblyName, - pBoundAssemblyName)); -#endif // FEATURE_VERSIONING_LOG - IF_FAIL_GO(FUSION_E_REF_DEF_MISMATCH); } @@ -1164,13 +973,6 @@ namespace BINDER_SPACE } } -#ifdef FEATURE_VERSIONING_LOG - // Log the candidates we throw out for diagnostics - IF_FAIL_GO(LogConfigurationError(pApplicationContext, - pRequestedAssemblyName, - pAssembly->GetAssemblyName())); -#endif // FEATURE_VERSIONING_LOG - IF_FAIL_GO(FUSION_E_REF_DEF_MISMATCH); } diff --git a/src/coreclr/src/binder/bindinglog.cpp b/src/coreclr/src/binder/bindinglog.cpp deleted file mode 100644 index 421ca499478d91a12c14fd6ac79956a48e2a0c1a..0000000000000000000000000000000000000000 --- a/src/coreclr/src/binder/bindinglog.cpp +++ /dev/null @@ -1,294 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ============================================================ -// -// BindingLog.cpp -// - - -// -// Implements the fusion-like BindingLog class -// -// ============================================================ - -#ifdef FEATURE_VERSIONING_LOG - -#include "bindinglog.hpp" -#include "assemblyname.hpp" -#include "assembly.hpp" -#include "applicationcontext.hpp" -#include "bindresult.hpp" -#include "cdebuglog.hpp" -#include "variables.hpp" -#include "bindresult.inl" - -#include "strsafe.h" - -#define SIZE_OF_TOKEN_INFORMATION \ - (sizeof( TOKEN_USER ) \ - + sizeof( SID ) \ - + sizeof( ULONG ) * SID_MAX_SUB_AUTHORITIES) - -#include "../dlls/mscorrc/fusres.h" - -STDAPI BinderGetDisplayName(PEAssembly *pAssembly, - SString &displayName); - -namespace BINDER_SPACE -{ - namespace - { - inline UINT GetPreBindStateName(AssemblyName *pAssemblyName) - { - if (pAssemblyName->HaveAssemblyVersion()) - { - return ID_FUSLOG_BINDING_PRE_BIND_STATE_BY_NAME; - } - else - { - return ID_FUSLOG_BINDING_PRE_BIND_STATE_BY_NAME_PARTIAL; - } - } - }; - - BindingLog::BindingLog() - { - m_pCDebugLog = NULL; - } - - BindingLog::~BindingLog() - { - SAFE_RELEASE(m_pCDebugLog); - } - - /* static */ - HRESULT BindingLog::CreateInContext(ApplicationContext *pApplicationContext, - SString &assemblyPath, - PEAssembly *pParentAssembly) - { - if (!IsLoggingNeeded()) - return S_OK; - - return CreateInContext(pApplicationContext, NULL, assemblyPath, pParentAssembly); - } - - /* static */ - BOOL BindingLog::IsLoggingNeeded() - { -#ifdef FEATURE_VERSIONING_LOG - return g_BinderVariables->fLoggingNeeded; -#else // FEATURE_VERSIONING_LOG - return FALSE; -#endif // FEATURE_VERSIONING_LOG - } - - /* static */ - HRESULT BindingLog::CreateInContext(ApplicationContext *pApplicationContext, - AssemblyName *pAssemblyName, - PEAssembly *pParentAssembly) - { - HRESULT hr = S_OK; - - if (IsLoggingNeeded()) - { - SmallStackSString emptyString; - - IF_FALSE_GO(pAssemblyName != NULL); - IF_FAIL_GO(CreateInContext(pApplicationContext, - pAssemblyName, - emptyString, - pParentAssembly)); - } - - Exit: - return hr; - } - - HRESULT BindingLog::Log(SString &info) - { - return GetDebugLog()->LogMessage(0, FUSION_BIND_LOG_CATEGORY_DEFAULT, info); - } - - HRESULT BindingLog::LogAssemblyName(LPCWSTR pwzPrefix, - AssemblyName *pAssemblyName) - { - HRESULT hr = S_OK; - PathString assemblyDisplayName; - - // Verify input arguments - IF_FALSE_GO(pwzPrefix != NULL); - IF_FALSE_GO(pAssemblyName != NULL); - - pAssemblyName->GetDisplayName(assemblyDisplayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE); - IF_FAIL_GO(Log(pwzPrefix, assemblyDisplayName)); - - Exit: - return hr; - } - - HRESULT BindingLog::LogHR(HRESULT logHR) - { - return GetDebugLog()->SetResultCode(0, logHR); - } - - HRESULT BindingLog::LogResult(BindResult *pBindResult) - { - HRESULT hr = S_OK; - PathString assemblyDisplayName; - PathString format; - PathString info; - - pBindResult->GetAssemblyName()->GetDisplayName(assemblyDisplayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE); - - IF_FAIL_GO(format.LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_TO_ID)); - info.Printf(format.GetUnicode(), assemblyDisplayName.GetUnicode()); - IF_FAIL_GO(Log(info)); - - IUnknown *pIUnknownAssembly; - pIUnknownAssembly = pBindResult->GetAssembly(FALSE /* fAddRef */); - Assembly *pAssembly; - pAssembly = static_cast(static_cast(pIUnknownAssembly)); - _ASSERTE(pAssembly != NULL); - - if (pAssembly->GetIsInGAC()) - { - IF_FAIL_GO(info. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_GAC)); - } - else if (pAssembly->GetIsByteArray()) - { - IF_FAIL_GO(info. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_BYTE_ARRAY)); - } - else - { - PathString assemblyPath; - - BinderGetImagePath(pAssembly->GetPEImage(), assemblyPath); - IF_FAIL_GO(format. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_TO_LOCATION)); - info.Printf(format.GetUnicode(), assemblyPath.GetUnicode()); - } - IF_FAIL_GO(Log(info)); - - Exit: - return hr; - } - - HRESULT BindingLog::Flush() - { - HRESULT hr = S_OK; - - hr = GetDebugLog()->Flush(0, FUSION_BIND_LOG_CATEGORY_DEFAULT); - if (hr == E_ACCESSDENIED) - { - // We've been impersonated differently and have a old log entry - hr = S_OK; - } - - return hr; - } - - /* static */ - HRESULT BindingLog::CreateInContext(ApplicationContext *pApplicationContext, - AssemblyName *pAssemblyName, - SString &assemblyPath, - PEAssembly *pParentAssembly) - { - HRESULT hr = S_OK; - - BindingLog *pBindingLog = pApplicationContext->GetBindingLog(); - - // Invalidate existing debug log - pBindingLog->SetDebugLog(NULL); - - IF_FAIL_GO(CDebugLog::Create(pApplicationContext, - pAssemblyName, - assemblyPath, - &pBindingLog->m_pCDebugLog)); - - IF_FAIL_GO(pBindingLog->LogPreBindState(pApplicationContext, - pAssemblyName, - assemblyPath, - pParentAssembly)); - Exit: - return hr; - } - - HRESULT BindingLog::LogPreBindState(ApplicationContext *pApplicationContext, - AssemblyName *pAssemblyName, - SString &assemblyPath, - PEAssembly *pParentAssembly) - { - HRESULT hr = S_OK; - PathString format; - PathString info; - - IF_FAIL_GO(info.LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_PRE_BIND_STATE_BEGIN)); - IF_FAIL_GO(Log(info)); - - if (pAssemblyName != NULL) - { - PathString assemblyDisplayName; - - pAssemblyName->GetDisplayName(assemblyDisplayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE | - AssemblyName::INCLUDE_RETARGETABLE); - - IF_FAIL_GO(format.LoadResourceAndReturnHR(CCompRC::Debugging, - GetPreBindStateName(pAssemblyName))); - info.Printf(format.GetUnicode(), assemblyDisplayName.GetUnicode()); - } - else - { - IF_FAIL_GO(format. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_PRE_BIND_STATE_WHERE_REF)); - info.Printf(format.GetUnicode(), assemblyPath.GetUnicode()); - } - IF_FAIL_GO(Log(info)); - - if (pParentAssembly != NULL) - { - PathString parentAssemblyDisplayName; - - IF_FAIL_GO(BinderGetDisplayName(pParentAssembly, parentAssemblyDisplayName)); - IF_FAIL_GO(format.LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_PRE_BIND_STATE_CALLER)); - info.Printf(format.GetUnicode(), parentAssemblyDisplayName.GetUnicode()); - } - else - { - IF_FAIL_GO(info. - LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_PRE_BIND_STATE_CALLER_UNKNOWN)); - } - IF_FAIL_GO(Log(info)); - - IF_FAIL_GO(info.LoadResourceAndReturnHR(CCompRC::Debugging, - ID_FUSLOG_BINDING_PRE_BIND_STATE_END)); - IF_FAIL_GO(Log(info)); - - Exit: - return hr; - } - - void BindingLog::SetDebugLog(CDebugLog *pCDebugLog) - { - SAFE_RELEASE(m_pCDebugLog); - m_pCDebugLog = pCDebugLog; - } -}; - -#endif // FEATURE_VERSIONING_LOG diff --git a/src/coreclr/src/binder/cdebuglog.cpp b/src/coreclr/src/binder/cdebuglog.cpp deleted file mode 100644 index 30148384e210a7d12d6dfded4c71933f3de04506..0000000000000000000000000000000000000000 --- a/src/coreclr/src/binder/cdebuglog.cpp +++ /dev/null @@ -1,464 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ============================================================ -// -// CDebugLog.cpp -// - - -// -// Implements the fusion-derived CDebugLog class -// -// ============================================================ - -#ifdef FEATURE_VERSIONING_LOG - -#include "cdebuglog.hpp" -#include "applicationcontext.hpp" -#include "assemblyname.hpp" -#include "variables.hpp" -#include "utils.hpp" - -#include "shlwapi.h" -#include "strsafe.h" - -#include "../dlls/mscorrc/fusres.h" - -#define MAX_DBG_STR_LEN 1024 -#define MAX_DATE_LEN 128 - -#define DEBUG_LOG_HTML_START L"
\r\n"
-#define DEBUG_LOG_HTML_META_LANGUAGE L""
-#define DEBUG_LOG_MARK_OF_THE_WEB    L""
-#define DEBUG_LOG_HTML_END           L"\r\n
" -#define DEBUG_LOG_NEW_LINE L"\r\n" - -namespace BINDER_SPACE -{ - namespace - { - inline LPCWSTR LogCategoryToString(DWORD dwLogCategory) - { - switch (dwLogCategory) - { - case FUSION_BIND_LOG_CATEGORY_DEFAULT: - return L"default"; - case FUSION_BIND_LOG_CATEGORY_NGEN: - return L"Native"; - default: - return L"Unknown"; - } - } - - HRESULT CreateFilePathHierarchy(LPCOLESTR pszName) - { - HRESULT hr=S_OK; - LPTSTR pszFileName; - PathString szPathString; - DWORD dw = 0; - - size_t pszNameLen = wcslen(pszName); - WCHAR * szPath = szPathString.OpenUnicodeBuffer(static_cast(pszNameLen)); - size_t cbSzPath = (sizeof(WCHAR)) * (pszNameLen + 1); // SString allocates extra byte for null - IF_FAIL_GO(StringCbCopy(szPath, cbSzPath, pszName)); - szPathString.CloseBuffer(static_cast(pszNameLen)); - - pszFileName = PathFindFileName(szPath); - - if (pszFileName <= szPath) - { - IF_FAIL_GO(E_INVALIDARG); - } - - *(pszFileName-1) = 0; - - dw = WszGetFileAttributes(szPath); - if (dw != INVALID_FILE_ATTRIBUTES) - { - return S_OK; - } - - hr = HRESULT_FROM_GetLastError(); - - switch (hr) - { - case __HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND): - { - hr = CreateFilePathHierarchy(szPath); - if (hr != S_OK) - return hr; - } - - case __HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): - { - if (WszCreateDirectory(szPath, NULL)) - return S_OK; - else - { - hr = HRESULT_FROM_WIN32(GetLastError()); - if(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)) - hr = S_OK; - else - return hr; - } - } - - default: - break; - } - - Exit: - return hr; - } - - HRESULT WriteLog(HANDLE hLogFile, - LPCWSTR pwzInfo) - { - HRESULT hr = S_OK; - DWORD dwLen = 0; - DWORD dwWritten = 0; - CHAR szBuf[MAX_DBG_STR_LEN]; - - dwLen = WszWideCharToMultiByte(CP_UTF8, - 0, - pwzInfo, - -1, - szBuf, - MAX_DBG_STR_LEN, - NULL, - NULL); - - if (!dwLen) - { - IF_FAIL_GO(HRESULT_FROM_GetLastError()); - } - - // dwLen includes NULL terminator. We don't want to write this out. - if (dwLen > 1) { - dwLen--; - - if (!WriteFile(hLogFile, szBuf, dwLen, &dwWritten, NULL)) { - IF_FAIL_GO(HRESULT_FROM_GetLastError()); - } - } - - Exit: - return hr; - } - - HRESULT GetBindTimeInfo(PathString &info) - { - HRESULT hr = S_OK; - SYSTEMTIME systime; - - { - WCHAR wzDateBuffer[MAX_DATE_LEN]; - WCHAR wzTimeBuffer[MAX_DATE_LEN]; - - GetLocalTime(&systime); - - if (!WszGetDateFormat(LOCALE_USER_DEFAULT, - 0, - &systime, - NULL, - wzDateBuffer, - MAX_DATE_LEN)) - { - return HRESULT_FROM_GetLastError(); - } - - if (!WszGetTimeFormat(LOCALE_USER_DEFAULT, - 0, - &systime, - NULL, - wzTimeBuffer, - MAX_DATE_LEN)) - { - return HRESULT_FROM_GetLastError(); - } - - info.Printf(L"(%s @ %s)", wzDateBuffer, wzTimeBuffer); - } - return hr; - } - - HRESULT GetHrResultInfo(PathString &info, HRESULT hrResult) - { - HRESULT hr = S_OK; - - // TODO: Get the result information in here. - info.Printf(L"%p.", hrResult); - - return hr; - } - - inline BOOL IsInvalidCharacter(WCHAR wcChar) - { - switch (wcChar) - { - case L':': - case L'/': - case L'\\': - case L'*': - case L'<': - case L'>': - case L'?': - case L'|': - case L'"': - return TRUE; - default: - return FALSE; - } - } - - inline void ReplaceInvalidFileCharacters(SString &assemblyName) - { - SString::Iterator pos = assemblyName.Begin(); - SString::Iterator end = assemblyName.End(); - - while (pos < end) - { - if (IsInvalidCharacter(pos[0])) - { - assemblyName.Replace(pos, L'_'); - } - - pos++; - } - } - }; - - CDebugLog::CDebugLog() - { - m_cRef = 1; - } - - CDebugLog::~CDebugLog() - { - // Nothing to do here - } - - /* static */ - HRESULT CDebugLog::Create(ApplicationContext *pApplicationContext, - AssemblyName *pAssemblyName, - SString &sCodeBase, - CDebugLog **ppCDebugLog) - { - HRESULT hr = S_OK; - ReleaseHolder pDebugLog; - - // Validate input arguments - IF_FALSE_GO(pApplicationContext != NULL); - IF_FALSE_GO(ppCDebugLog != NULL); - - SAFE_NEW(pDebugLog, CDebugLog); - IF_FAIL_GO(pDebugLog->Init(pApplicationContext, pAssemblyName, sCodeBase)); - - *ppCDebugLog = pDebugLog.Extract(); - - Exit: - return hr; - } - - ULONG CDebugLog::AddRef() - { - return InterlockedIncrement(&m_cRef); - } - - ULONG CDebugLog::Release() - { - ULONG ulRef; - - ulRef = InterlockedDecrement(&m_cRef); - - if (ulRef == 0) - { - delete this; - } - - return ulRef; - } - - HRESULT CDebugLog::SetResultCode(DWORD dwLogCategory, - HRESULT hrResult) - { - HRESULT hr = S_OK; - - IF_FALSE_GO(dwLogCategory < FUSION_BIND_LOG_CATEGORY_MAX); - - m_HrResult[dwLogCategory] = hrResult; - - Exit: - return hr; - } - - HRESULT CDebugLog::LogMessage(DWORD, - DWORD dwLogCategory, - SString &sDebugString) - { - HRESULT hr = S_OK; - - IF_FALSE_GO(dwLogCategory < FUSION_BIND_LOG_CATEGORY_MAX); - - m_content[dwLogCategory].AddTail(const_cast(sDebugString)); - - Exit: - return hr; - } - - HRESULT CDebugLog::Flush(DWORD, - DWORD dwLogCategory) - { - HRESULT hr = S_OK; - SmallStackSString sCategory(LogCategoryToString(dwLogCategory)); - PathString logFilePath; - ListNode *pListNode = NULL; - - IF_FALSE_GO(dwLogCategory < FUSION_BIND_LOG_CATEGORY_MAX); - - CombinePath(g_BinderVariables->logPath, sCategory, logFilePath); - CombinePath(logFilePath, m_applicationName, logFilePath); - CombinePath(logFilePath, m_logFileName, logFilePath); - - IF_FAIL_GO(CreateFilePathHierarchy(logFilePath.GetUnicode())); - - m_hLogFile = WszCreateFile(logFilePath.GetUnicode(), - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (m_hLogFile == INVALID_HANDLE_VALUE) - { - // Silently ignore unability to log. - GO_WITH_HRESULT(S_OK); - } - - LogHeader(dwLogCategory); - - pListNode = static_cast *>(m_content[dwLogCategory].GetHeadPosition()); - while (pListNode != NULL) - { - SString item = pListNode->GetItem(); - - IF_FAIL_GO(WriteLog(m_hLogFile, item.GetUnicode())); - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_NEW_LINE)); - - pListNode = pListNode->GetNext(); - } - - LogFooter(dwLogCategory); - - // Ignore failure - CloseHandle(m_hLogFile.Extract()); - - Exit: - return hr; - } - - HRESULT CDebugLog::Init(ApplicationContext *pApplicationContext, - AssemblyName *pAssemblyName, - SString &sCodeBase) - { - HRESULT hr = S_OK; - - m_applicationName.Set(pApplicationContext->GetApplicationName()); - ReplaceInvalidFileCharacters(m_applicationName); - - if (m_applicationName.IsEmpty()) - { - m_applicationName.Set(L"unknown"); - } - - if (pAssemblyName == NULL) - { - m_logFileName.Set(L"WhereRefBind!Host=(LocalMachine)!FileName=("); - - LPCWSTR pwzFileName = PathFindFileNameW(sCodeBase.GetUnicode()); - if (pwzFileName != NULL) - { - m_logFileName.Append(pwzFileName); - } - m_logFileName.Append(L").HTM"); - } - else - { - PathString assemblyDisplayName; - - pAssemblyName->GetDisplayName(assemblyDisplayName, - AssemblyName::INCLUDE_VERSION | - AssemblyName::INCLUDE_ARCHITECTURE | - AssemblyName::INCLUDE_RETARGETABLE); - - ReplaceInvalidFileCharacters(assemblyDisplayName); - - m_logFileName.Set(assemblyDisplayName); - m_logFileName.Append(L".HTM"); - } - - return hr; - } - - HRESULT CDebugLog::LogHeader(DWORD dwLogCategory) - { - HRESULT hr = S_OK; - PathString info; - PathString temp; - PathString format; - - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_HTML_META_LANGUAGE)); - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_MARK_OF_THE_WEB)); - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_HTML_START)); - - IF_FAIL_GO(GetBindTimeInfo(temp)); - IF_FAIL_GO(format.LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_HEADER_BEGIN)); - info.Printf(format.GetUnicode(), temp.GetUnicode()); - IF_FAIL_GO(WriteLog(m_hLogFile, info.GetUnicode())); - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_NEW_LINE DEBUG_LOG_NEW_LINE)); - - if (SUCCEEDED(m_HrResult[dwLogCategory])) - { - IF_FAIL_GO(temp. - LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_HEADER_BIND_RESULT_SUCCESS)); - IF_FAIL_GO(WriteLog(m_hLogFile, temp.GetUnicode())); - } - else - { - IF_FAIL_GO(temp. - LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_HEADER_BIND_RESULT_ERROR)); - IF_FAIL_GO(WriteLog(m_hLogFile, temp.GetUnicode())); - } - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_NEW_LINE)); - - GetHrResultInfo(temp, m_HrResult[dwLogCategory]); - - IF_FAIL_GO(format.LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_HEADER_BIND_RESULT)); - info.Printf(format.GetUnicode(), temp.GetUnicode()); - IF_FAIL_GO(WriteLog(m_hLogFile, info.GetUnicode())); - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_NEW_LINE DEBUG_LOG_NEW_LINE)); - - // TODO: Assembly Manager info + Executable info. - - IF_FAIL_GO(info.LoadResourceAndReturnHR(CCompRC::Debugging, ID_FUSLOG_BINDING_HEADER_END)); - IF_FAIL_GO(WriteLog(m_hLogFile, info.GetUnicode())); - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_NEW_LINE DEBUG_LOG_NEW_LINE)); - - Exit: - return hr; - } - - HRESULT CDebugLog::LogFooter(DWORD) - { - HRESULT hr = S_OK; - - IF_FAIL_GO(WriteLog(m_hLogFile, DEBUG_LOG_HTML_END)); - - Exit: - return hr; - } -}; - -#endif // FEATURE_VERSIONING_LOG diff --git a/src/coreclr/src/binder/inc/applicationcontext.hpp b/src/coreclr/src/binder/inc/applicationcontext.hpp index 3117ca1e052ada1c6a7f49f3b45961b887b1fd28..9192783e97201c5925ecb304bd43fa033c164989 100644 --- a/src/coreclr/src/binder/inc/applicationcontext.hpp +++ b/src/coreclr/src/binder/inc/applicationcontext.hpp @@ -18,9 +18,6 @@ #include "bindertypes.hpp" #include "failurecache.hpp" #include "assemblyidentitycache.hpp" -#ifdef FEATURE_VERSIONING_LOG -#include "bindinglog.hpp" -#endif // FEATURE_VERSIONING_LOG #include "stringarraylist.h" namespace BINDER_SPACE @@ -146,11 +143,6 @@ namespace BINDER_SPACE inline LONG GetVersion(); inline void IncrementVersion(); -#ifdef FEATURE_VERSIONING_LOG - inline BindingLog *GetBindingLog(); - inline void ClearBindingLog(); -#endif // FEATURE_VERSIONING_LOG - protected: LONG m_cRef; Volatile m_cVersion; @@ -159,9 +151,6 @@ namespace BINDER_SPACE ExecutionContext *m_pExecutionContext; FailureCache *m_pFailureCache; CRITSEC_COOKIE m_contextCS; -#ifdef FEATURE_VERSIONING_LOG - BindingLog m_bindingLog; -#endif // FEATURE_VERSIONING_LOG AssemblyIdentityCache m_assemblyIdentityCache; diff --git a/src/coreclr/src/binder/inc/applicationcontext.inl b/src/coreclr/src/binder/inc/applicationcontext.inl index 8dcf4bd9a7ec35a37fc8171eb8335aecf1a443bf..1fd89749af24a82164361c06aac939aca3b01ffc 100644 --- a/src/coreclr/src/binder/inc/applicationcontext.inl +++ b/src/coreclr/src/binder/inc/applicationcontext.inl @@ -89,17 +89,4 @@ CRITSEC_COOKIE ApplicationContext::GetCriticalSectionCookie() return m_contextCS; } -#ifdef FEATURE_VERSIONING_LOG -BindingLog *ApplicationContext::GetBindingLog() -{ - return &m_bindingLog; -} - -void ApplicationContext::ClearBindingLog() -{ - m_bindingLog.SetDebugLog(NULL); -} -#endif // FEATURE_VERSIONING_LOG - - #endif diff --git a/src/coreclr/src/binder/inc/assembly.hpp b/src/coreclr/src/binder/inc/assembly.hpp index f272c1d5f59f180040cd5c447a0fd4175f11a5b9..ccf1246b1b7247f9caa4b48ddfd67ce7ad4b7b97 100644 --- a/src/coreclr/src/binder/inc/assembly.hpp +++ b/src/coreclr/src/binder/inc/assembly.hpp @@ -40,9 +40,6 @@ STDAPI BinderAcquireImport(PEImage *pPEImage, STDAPI BinderHasNativeHeader(PEImage *pPEImage, BOOL *result); -STDAPI BinderGetImagePath(PEImage *pPEImage, - SString &imagePath); - STDAPI BinderReleasePEImage(PEImage *pPEImage); STDAPI BinderAddRefPEImage(PEImage *pPEImage); @@ -102,8 +99,7 @@ namespace BINDER_SPACE inline AssemblyName *GetAssemblyName(BOOL fAddRef = FALSE); inline BOOL GetIsInGAC(); - inline BOOL GetIsByteArray(); - inline void SetIsByteArray(BOOL fIsByteArray); + inline SString &GetPath(); inline PEImage *GetPEImage(BOOL fAddRef = FALSE); diff --git a/src/coreclr/src/binder/inc/assembly.inl b/src/coreclr/src/binder/inc/assembly.inl index 0b6eec927ff4872c6ee9644d6925a4d560b772c5..42603cfae82eb2e1b42c79bf5739664856a8de1c 100644 --- a/src/coreclr/src/binder/inc/assembly.inl +++ b/src/coreclr/src/binder/inc/assembly.inl @@ -100,23 +100,6 @@ void Assembly::SetIsInGAC(BOOL fIsInGAC) } } -BOOL Assembly::GetIsByteArray() -{ - return ((m_dwAssemblyFlags & FLAG_IS_BYTE_ARRAY) != 0); -} - -void Assembly::SetIsByteArray(BOOL fIsByteArray) -{ - if (fIsByteArray) - { - m_dwAssemblyFlags |= FLAG_IS_BYTE_ARRAY; - } - else - { - m_dwAssemblyFlags &= ~FLAG_IS_BYTE_ARRAY; - } -} - SString &Assembly::GetPath() { return m_assemblyPath; diff --git a/src/coreclr/src/binder/inc/assemblyname.hpp b/src/coreclr/src/binder/inc/assemblyname.hpp index ef121d124b5dc9111a2aeab38781c92d27b13c92..439fc46333a5d38740193b09b47b5ee25e3ff4df 100644 --- a/src/coreclr/src/binder/inc/assemblyname.hpp +++ b/src/coreclr/src/binder/inc/assemblyname.hpp @@ -66,8 +66,6 @@ namespace BINDER_SPACE inline void SetHave(DWORD dwIdentityFlags); - inline BOOL HaveAssemblyVersion(); - BOOL IsMscorlib(); ULONG Hash(/* in */ DWORD dwIncludeFlags); diff --git a/src/coreclr/src/binder/inc/assemblyname.inl b/src/coreclr/src/binder/inc/assemblyname.inl index f45e52af2634dfd75735c1c6e9bd2ae428a05ff7..0352f95461878515f6b39b66c37adb7f8196596d 100644 --- a/src/coreclr/src/binder/inc/assemblyname.inl +++ b/src/coreclr/src/binder/inc/assemblyname.inl @@ -131,9 +131,4 @@ void AssemblyName::SetHave(DWORD dwIdentityFlags) AssemblyIdentity::SetHave(dwIdentityFlags); } -BOOL AssemblyName::HaveAssemblyVersion() -{ - return m_version.HasMajor(); -} - #endif diff --git a/src/coreclr/src/binder/inc/bindertypes.hpp b/src/coreclr/src/binder/inc/bindertypes.hpp index 7e8eeece1a206b538c6b369705e69f53fac631da..213b128af223a6d9fe88c710c7e41f7bf0a7e5e8 100644 --- a/src/coreclr/src/binder/inc/bindertypes.hpp +++ b/src/coreclr/src/binder/inc/bindertypes.hpp @@ -43,11 +43,6 @@ namespace BINDER_SPACE class BindResult; class FailureCache; class AssemblyBinder; - -#if defined(FEATURE_VERSIONING_LOG) - class BindingLog; - class CDebugLog; -#endif // FEATURE_VERSIONING_LOG }; #define IF_FAIL_GO(expr) \ diff --git a/src/coreclr/src/binder/inc/bindinglog.hpp b/src/coreclr/src/binder/inc/bindinglog.hpp deleted file mode 100644 index d1467ed5c443b2e64d17265652914954f3d183ee..0000000000000000000000000000000000000000 --- a/src/coreclr/src/binder/inc/bindinglog.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ============================================================ -// -// BindingLog.hpp -// - - -// -// Defines the BindingLog class -// -// ============================================================ - -#ifndef __BINDER__BINDING_LOG_HPP__ -#define __BINDER__BINDING_LOG_HPP__ - -#include "bindertypes.hpp" - -namespace BINDER_SPACE -{ - class BindingLog - { - public: - BindingLog(); - ~BindingLog(); - - // - // These functions will create a new log together with pre-bind state - // information if needed and store it into the application context. - // This is to avoid endlessly passing around the debug log. - // - static HRESULT CreateInContext(/* in */ ApplicationContext *pApplicationContext, - /* in */ SString &assemblyPath, - /* in */ PEAssembly *pParentAssembly); - static HRESULT CreateInContext(/* in */ ApplicationContext *pApplicationContext, - /* in */ AssemblyName *pAssemblyName, - /* in */ PEAssembly *pParentAssembly); - - HRESULT Log(SString &info); - - inline HRESULT Log(LPCWSTR pwzInfo); - inline HRESULT Log(/* in */ LPCWSTR pwzPrefix, - /* in */ SString &info); - - HRESULT LogAssemblyName(/* in */ LPCWSTR pwzPrefix, - /* in */ AssemblyName *pAssemblyName); - - HRESULT LogHR(/* in */ HRESULT logHR); - HRESULT LogResult(/* in */ BindResult *pBindResult); - - HRESULT Flush(); - - inline BOOL CanLog(); - - void SetDebugLog(CDebugLog *pCDebugLog); - - protected: - static BOOL IsLoggingNeeded(); - - static HRESULT CreateInContext(/* in */ ApplicationContext *pApplicationContext, - /* in */ AssemblyName *pAssemblyName, - /* in */ SString &assemblyPath, - /* in */ PEAssembly *pParentAssembly); - - HRESULT LogPreBindState(/* in */ ApplicationContext *pApplicationContext, - /* in */ AssemblyName *pAssemblyName, - /* in */ SString &assemblyPath, - /* in */ PEAssembly *pParentAssembly); - - - inline CDebugLog *GetDebugLog(); - - HRESULT LogUser(); - - CDebugLog *m_pCDebugLog; - }; - -#include "bindinglog.inl" -}; - -#endif diff --git a/src/coreclr/src/binder/inc/bindinglog.inl b/src/coreclr/src/binder/inc/bindinglog.inl deleted file mode 100644 index f342f618ea3b8b24184f2a330a1cd01e85140cfd..0000000000000000000000000000000000000000 --- a/src/coreclr/src/binder/inc/bindinglog.inl +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ============================================================ -// -// BindingLog.inl -// - - -// -// Implements inlined methods of BindingLog -// -// ============================================================ - -#ifndef __BINDER__BINDING_LOG_INL__ -#define __BINDER__BINDING_LOG_INL__ - -BOOL BindingLog::CanLog() -{ - return (m_pCDebugLog != NULL); -} - -CDebugLog *BindingLog::GetDebugLog() -{ - _ASSERTE(m_pCDebugLog != NULL); - return m_pCDebugLog; -} - -HRESULT BindingLog::Log(LPCWSTR pwzInfo) -{ - PathString info(pwzInfo); - return BindingLog::Log(info); -} - -HRESULT BindingLog::Log(LPCWSTR pwzPrefix, - SString &info) -{ - PathString message; - - message.Append(pwzPrefix); - message.Append(info); - - return Log(message); -} - -#endif diff --git a/src/coreclr/src/binder/inc/bindresult.hpp b/src/coreclr/src/binder/inc/bindresult.hpp index 42dc593965815765e5373f5c8dd4f75482d8cd9c..40fa5a5a1853ef27ca6f2ffbc2fef5e0e3995530 100644 --- a/src/coreclr/src/binder/inc/bindresult.hpp +++ b/src/coreclr/src/binder/inc/bindresult.hpp @@ -43,7 +43,6 @@ namespace BINDER_SPACE inline void SetNoResult(); inline BOOL HaveResult(); - inline IUnknown *ExtractAssembly(); inline void Reset(); protected: diff --git a/src/coreclr/src/binder/inc/bindresult.inl b/src/coreclr/src/binder/inc/bindresult.inl index 87262d8ad9ebd6aa721d8b974d23de2b89722496..eacda7d792632cdcb5a93d3536d647d41d374b64 100644 --- a/src/coreclr/src/binder/inc/bindresult.inl +++ b/src/coreclr/src/binder/inc/bindresult.inl @@ -154,11 +154,6 @@ BOOL BindResult::HaveResult() return (GetAssemblyName() != NULL); } -IUnknown *BindResult::ExtractAssembly() -{ - return m_pIUnknownAssembly.Extract(); -} - void BindResult::Reset() { SAFE_RELEASE(m_pAssemblyName); diff --git a/src/coreclr/src/binder/inc/cdebuglog.hpp b/src/coreclr/src/binder/inc/cdebuglog.hpp deleted file mode 100644 index 37e1bc65b9737ba98b7918f14d62d9de142cb229..0000000000000000000000000000000000000000 --- a/src/coreclr/src/binder/inc/cdebuglog.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ============================================================ -// -// CDebugLog.hpp -// - - -// -// Defines the CDebugLog class -// -// ============================================================ - -#ifndef __BINDER__C_DEBUG_LOG_HPP__ -#define __BINDER__C_DEBUG_LOG_HPP__ - -#include "bindertypes.hpp" -#include "list.hpp" - -#define FUSION_BIND_LOG_CATEGORY_DEFAULT 0 -#define FUSION_BIND_LOG_CATEGORY_NGEN 1 -#define FUSION_BIND_LOG_CATEGORY_MAX 2 - -namespace BINDER_SPACE -{ - class CDebugLog - { - public: - CDebugLog(); - ~CDebugLog(); - - static HRESULT Create(/* in */ ApplicationContext *pApplicationContext, - /* in */ AssemblyName *pAssemblyName, - /* in */ SString &sCodeBase, - /* out */ CDebugLog **ppCDebugLog); - - ULONG AddRef(); - ULONG Release(); - - HRESULT SetResultCode(/* in */ DWORD dwLogCategory, - /* in */ HRESULT hrResult); - - HRESULT LogMessage(/* in */ DWORD dwDetailLevel, - /* in */ DWORD dwLogCategory, - /* in */ SString &sDebugString); - - HRESULT Flush(/* in */ DWORD dwDetailLevel, - /* in */ DWORD dwLogCategory); - protected: - HRESULT Init(/* in */ ApplicationContext *pApplicationContext, - /* in */ AssemblyName *pAssemblyName, - /* in */ SString &sCodeBase); - - HRESULT LogHeader(/* in */ DWORD dwLogCategory); - HRESULT LogFooter(/* in */ DWORD dwLogCategory); - - LONG m_cRef; - FileHandleHolder m_hLogFile; - List m_content[FUSION_BIND_LOG_CATEGORY_MAX]; - SString m_applicationName; - SString m_logFileName; - HRESULT m_HrResult[FUSION_BIND_LOG_CATEGORY_MAX]; - }; -}; - -#endif diff --git a/src/coreclr/src/binder/inc/list.hpp b/src/coreclr/src/binder/inc/list.hpp deleted file mode 100644 index 2125924986e0d37bd1d984333c6468b083acdb3e..0000000000000000000000000000000000000000 --- a/src/coreclr/src/binder/inc/list.hpp +++ /dev/null @@ -1,356 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ============================================================ -// -// List.hpp -// - - -// -// Defines the List class -// -// ============================================================ - -#ifndef __BINDER__LIST_HPP__ -#define __BINDER__LIST_HPP__ - -#include "bindertypes.hpp" -#include "ex.h" - -namespace BINDER_SPACE -{ - // - // ListNode - // - - typedef void *LISTNODE; - - template class ListNode - { - public: - ListNode(Type item); - virtual ~ListNode(); - - void SetNext(ListNode *pNode); - void SetPrev(ListNode *pNode); - Type GetItem(); - ListNode *GetNext(); - ListNode *GetPrev(); - - private: - Type _type; - ListNode *_pNext; - ListNode *_pPrev; - }; - - // - // List - // - - template class List - { - public: - List(); - ~List(); - - LISTNODE AddHead(const Type &item); - LISTNODE AddTail(const Type &item); - - LISTNODE GetHeadPosition(); - LISTNODE GetTailPosition(); - void RemoveAt(LISTNODE pNode); - void RemoveAll(); - LISTNODE Find(const Type &item); - int GetCount(); - Type GetNext(LISTNODE &pNode); - Type GetAt(LISTNODE pNode); - LISTNODE AddSorted(const Type &item, LPVOID pfn); - - public: - DWORD _dwSig; - - private: - ListNode *_pHead; - ListNode *_pTail; - int _iCount; - }; - - // - // ListNode Implementation - // - - template ListNode::ListNode(Type item) - : _type(item) - , _pNext(NULL) - , _pPrev(NULL) - { - } - - template ListNode::~ListNode() - { - } - - template void ListNode::SetNext(ListNode *pNode) - { - _pNext = pNode; - } - - template void ListNode::SetPrev(ListNode *pNode) - { - _pPrev = pNode; - } - - template Type ListNode::GetItem() - { - return _type; - } - - template ListNode *ListNode::GetNext() - { - return _pNext; - } - - template ListNode *ListNode::GetPrev() - { - return _pPrev; - } - - - // - // List Implementation - // - - template List::List() - : _pHead(NULL) - , _pTail(NULL) - , _iCount(0) - { - _dwSig = 0x5453494c; /* 'TSIL' */ - } - - template List::~List() - { - HRESULT hr = S_OK; - - EX_TRY - { - RemoveAll(); - } - EX_CATCH_HRESULT(hr); - } - - template LISTNODE List::AddHead(const Type &item) - { - ListNode *pNode = NULL; - - NEW_CONSTR(pNode, ListNode(item)); - if (pNode) { - _iCount++; - pNode->SetNext(_pHead); - pNode->SetPrev(NULL); - if (_pHead == NULL) { - _pTail = pNode; - } - else { - _pHead->SetPrev(pNode); - } - _pHead = pNode; - } - - return (LISTNODE)pNode; - } - - template LISTNODE List::AddSorted(const Type &item, - LPVOID pfn) - { - ListNode *pNode = NULL; - LISTNODE pCurrNode = NULL; - LISTNODE pPrevNode = NULL; - int i; - Type curItem; - - LONG (*pFN) (const Type item1, const Type item2); - - pFN = (LONG (*) (const Type item1, const Type item2))pfn; - - if(_pHead == NULL) { - return AddHead(item); - } - else { - pCurrNode = GetHeadPosition(); - curItem = ((ListNode *) pCurrNode)->GetItem(); - for (i = 0; i < _iCount; i++) { - if (pFN(item, curItem) < 1) { - NEW_CONSTR(pNode, ListNode(item)); - if (pNode) { - pNode->SetPrev((ListNode *)pPrevNode); - pNode->SetNext((ListNode *)pCurrNode); - // update pPrevNode - if(pPrevNode) { - ((ListNode *)pPrevNode)->SetNext(pNode); - } - else { - _pHead = pNode; - } - // update pCurrNode - ((ListNode *)pCurrNode)->SetPrev(pNode); - _iCount++; - } - break; - } - pPrevNode = pCurrNode; - GetNext(pCurrNode); - if(i+1 == _iCount) { - return AddTail(item); - } - else { - _ASSERTE(pCurrNode); - curItem = GetAt(pCurrNode); - } - } - } - - return (LISTNODE)pNode; - } - - template LISTNODE List::AddTail(const Type &item) - { - ListNode *pNode = NULL; - - NEW_CONSTR(pNode, ListNode(item)); - if (pNode) { - _iCount++; - if (_pTail) { - pNode->SetPrev(_pTail); - _pTail->SetNext(pNode); - _pTail = pNode; - } - else { - _pHead = _pTail = pNode; - } - } - - return (LISTNODE)pNode; - } - - template int List::GetCount() - { - return _iCount; - } - - template LISTNODE List::GetHeadPosition() - { - return (LISTNODE)_pHead; - } - - template LISTNODE List::GetTailPosition() - { - return (LISTNODE)_pTail; - } - - template Type List::GetNext(LISTNODE &pNode) - { - ListNode *pListNode = (ListNode *)pNode; - - // Faults if you pass NULL - _ASSERTE(pNode); - - Type item = pListNode->GetItem(); - pNode = (LISTNODE)(pListNode->GetNext()); - - return item; - } - - template void List::RemoveAll() - { - int i; - LISTNODE listNode = NULL; - ListNode *pDelNode = NULL; - - listNode = GetHeadPosition(); - - for (i = 0; i < _iCount; i++) { - pDelNode = (ListNode *)listNode; - GetNext(listNode); - SAFE_DELETE(pDelNode); - } - - _iCount = 0; - _pHead = NULL; - _pTail = NULL; - } - - template void List::RemoveAt(LISTNODE pNode) - { - ListNode *pListNode = (ListNode *)pNode; - ListNode *pPrevNode = NULL; - ListNode *pNextNode = NULL; - - if (pNode) { - pPrevNode = pListNode->GetPrev(); - pNextNode = pListNode->GetNext(); - - if (pPrevNode) { - pPrevNode->SetNext(pNextNode); - if (pNextNode) { - pNextNode->SetPrev(pPrevNode); - } - else { - // We're removing the last node, so we have a new tail - _pTail = pPrevNode; - } - SAFE_DELETE(pListNode); - } - else { - // No previous, so we are the head of the list - _pHead = pNextNode; - if (pNextNode) { - pNextNode->SetPrev(NULL); - } - else { - // No previous, or next. There was only one node. - _pHead = NULL; - _pTail = NULL; - } - SAFE_DELETE(pListNode); - } - - _iCount--; - } - } - - - template LISTNODE List::Find(const Type &item) - { - int i; - Type curItem; - LISTNODE pNode = NULL; - LISTNODE pMatchNode = NULL; - ListNode * pListNode = NULL; - - pNode = GetHeadPosition(); - for (i = 0; i < _iCount; i++) { - pListNode = (ListNode *)pNode; - curItem = GetNext(pNode); - if (curItem == item) { - pMatchNode = (LISTNODE)pListNode; - break; - } - } - - return pMatchNode; - } - - template Type List::GetAt(LISTNODE pNode) - { - ListNode *pListNode = (ListNode *)pNode; - - // Faults if you pass NULL - _ASSERTE(pNode); - - return pListNode->GetItem(); - } -}; - -#endif diff --git a/src/coreclr/src/binder/inc/variables.hpp b/src/coreclr/src/binder/inc/variables.hpp index d31587021cf26ce9d1cdb01e9f02975c5072883b..7208d6dc4a44a7648ab933323c4de9539e118f37 100644 --- a/src/coreclr/src/binder/inc/variables.hpp +++ b/src/coreclr/src/binder/inc/variables.hpp @@ -27,26 +27,12 @@ namespace BINDER_SPACE HRESULT Init(); - // ApplicationContext string constants - SString AppBaseURL; - SString DynamicDirectory; - SString DynamicBaseDirectory; - SString AppName; - SString AppConfigFile; - SString AppDomainId; - // AssemblyBinder string constants SString httpURLPrefix; // AssemblyName string constants SString cultureNeutral; - SString emptyString; SString mscorlib; - -#ifdef FEATURE_VERSIONING_LOG - BOOL fLoggingNeeded; - SString logPath; -#endif // FEATURE_VERSIONING_LOG }; extern Variables *g_BinderVariables; diff --git a/src/coreclr/src/binder/variables.cpp b/src/coreclr/src/binder/variables.cpp index f1afee471ac3fae4c3cd07b57f6e9a6c29aa7b06..6d07b5991d7ce9e065f602871e649b6ddd0990ba 100644 --- a/src/coreclr/src/binder/variables.cpp +++ b/src/coreclr/src/binder/variables.cpp @@ -18,41 +18,6 @@ namespace BINDER_SPACE { -#ifdef FEATURE_VERSIONING_LOG - namespace - { - HRESULT CheckFileExistence(LPCWSTR pwzFile, LPDWORD pdwAttrib) - { - HRESULT hr = S_FALSE; - DWORD dwRet = 0; - - _ASSERTE(pwzFile && pdwAttrib); - - *pdwAttrib = 0; - - dwRet = WszGetFileAttributes(pwzFile); - if (dwRet == INVALID_FILE_ATTRIBUTES) - { - hr = HRESULT_FROM_GetLastError(); - - if ((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || - (hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND))) - { - GO_WITH_HRESULT(S_FALSE); - } - } - else - { - *pdwAttrib = dwRet; - GO_WITH_HRESULT(S_OK); - } - - Exit: - return hr; - } - }; -#endif // FEATURE_VERSIONING_LOG - Variables *g_BinderVariables = NULL; Variables::Variables() @@ -71,56 +36,12 @@ namespace BINDER_SPACE EX_TRY { - // ApplicationContext string constants - // AssemblyBinder string constants httpURLPrefix.SetLiteral(W("http://")); // AssemblyName string constants cultureNeutral.SetLiteral(W("neutral")); mscorlib.SetLiteral(CoreLibName_W); - - emptyString.Clear(); - -#ifdef FEATURE_VERSIONING_LOG - REGUTIL::CORConfigLevel kCorConfigLevel = - static_cast(REGUTIL::COR_CONFIG_ENV | - REGUTIL::COR_CONFIG_FUSION); - - DWORD dwLoggingNeeded = REGUTIL::GetConfigDWORD_DontUse_(CLRConfig::EXTERNAL_ForceLog, - 0, - kCorConfigLevel, - TRUE); - fLoggingNeeded = (dwLoggingNeeded ? TRUE : FALSE); - - NewArrayHolder pwzLogDirectory = REGUTIL::GetConfigString_DontUse_(CLRConfig::INTERNAL_LogPath, - TRUE, - kCorConfigLevel, - FALSE /* fUsePerfCache */); - - // When no directory is specified, we can't log. - if (pwzLogDirectory == NULL) - { - fLoggingNeeded = FALSE; - } - else - { - DWORD dwAttr = 0; - - // If we do not get a regular directory, then we can't log either - hr = CheckFileExistence(pwzLogDirectory, &dwAttr); - if ((hr == S_OK) && ((dwAttr & FILE_ATTRIBUTE_DIRECTORY) != 0)) - { - logPath.Set(pwzLogDirectory); - } - else - { - // Any failure here simply yields no logging. - hr = S_OK; - fLoggingNeeded = FALSE; - } - } -#endif // FEATURE_VERSIONING_LOG } EX_CATCH_HRESULT(hr); diff --git a/src/coreclr/src/dlls/mscorrc/fuslog.rc b/src/coreclr/src/dlls/mscorrc/fuslog.rc deleted file mode 100644 index c02d1b692b0d8a4a080ae425c8e079d7c6b1a18f..0000000000000000000000000000000000000000 --- a/src/coreclr/src/dlls/mscorrc/fuslog.rc +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -#include "fusres.h" - - -STRINGTABLE DISCARDABLE -BEGIN - ID_FUSLOG_MANIFEST_FAILURE_NO_FILE L"WRN: Probed manifest path %s. No such file." - ID_FUSLOG_MANIFEST_FAILURE_PARSE_ERROR L"WRN: Probed manifest path %s. Ignored. Syntax error or URI encountered." - ID_FUSLOG_MANIFEST_FAILURE_UNKNOWN_ERROR L"WRN: Probed manifest path %s. Ignored. Unknown error occurred." - ID_FUSLOG_MANIFEST_FAILURE_EMPTY_DEFAULT L"WRN: Using empty default manifest." - - ID_FUSLOG_MANIFEST_STATUS_STATE_CONFIGURED L"LOG: Using configured manifest from %s." - ID_FUSLOG_MANIFEST_STATUS_STATE_INHERITED L"LOG: Using inherited manifest from %s." - - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_TO_ID L"LOG: Bound to assembly %s." - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_TO_LOCATION L"LOG: Assembly is picked up from %s." - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_GAC L"LOG: Assembly is picked up from GAC." - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_HAS L"LOG: Assembly is picked up from HAS." - ID_FUSLOG_ASSEMBLY_STATUS_BOUND_BYTE_ARRAY L"LOG: Assembly is picked up from byte array." - - ID_FUSLOG_BINDING_PRE_BIND_STATE_BEGIN L"=== Pre-bind state information ===" - ID_FUSLOG_BINDING_PRE_BIND_STATE_BY_NAME L"LOG: By-name Bind. Display name = %s" - ID_FUSLOG_BINDING_PRE_BIND_STATE_BY_NAME_PARTIAL L"WRN: Unsupported partial name Bind. Display name = %s" - ID_FUSLOG_BINDING_PRE_BIND_STATE_WHERE_REF L"LOG: Where-ref bind. Codebase = %s" - ID_FUSLOG_BINDING_PRE_BIND_STATE_CALLER L"Calling assembly : %s" - ID_FUSLOG_BINDING_PRE_BIND_STATE_CALLER_UNKNOWN L"Calling assembly : unknown" - ID_FUSLOG_BINDING_PRE_BIND_STATE_USER L"LOG: User = %s" - ID_FUSLOG_BINDING_PRE_BIND_STATE_USER_UNKNOWN L"LOG: User = unknown" - ID_FUSLOG_BINDING_PRE_BIND_STATE_END L"===" - - ID_FUSLOG_BINDING_LOCKED_UNLOCKED L"LOG: Display name not listed in manifest. This is a dynamic bind." - ID_FUSLOG_BINDING_LOCKED_ASSEMBLY_EXE_CONTEXT L"LOG: Execution context locked by already bound assembly. Display name = %s" - ID_FUSLOG_BINDING_LOCKED_ASSEMBLY_INS_CONTEXT L"LOG: Inspection context locked by already bound assembly. Display name = %s" - ID_FUSLOG_BINDING_LOCKED_MT_EXE_LOCKED_ENTRY L"LOG: Execution context locked by manifest. Display name = %s via locked entry." - ID_FUSLOG_BINDING_LOCKED_MT_EXE_LOCALI_ENTRY L"LOG: Execution context locked by manifest. Display name = %s via localizable entry." - ID_FUSLOG_BINDING_LOCKED_MT_EXE_CBASE_ENTRY L"LOG: Execution context locked by manifest. Display name = %s and Codebase = %s." - ID_FUSLOG_BINDING_LOCKED_MT_INS_LOCKED_ENTRY L"LOG: Inspection context locked by manifest. Display name = %s via locked entry." - ID_FUSLOG_BINDING_LOCKED_MT_INS_LOCALI_ENTRY L"LOG: Inspection context locked by manifest. Display name = %s via localizable entry." - ID_FUSLOG_BINDING_LOCKED_MT_INS_CBASE_ENTRY L"LOG: Inspection context locked by manifest. Display name = %s and Codebase = %s." - ID_FUSLOG_BINDING_BEHAVIOR_STATIC L"LOG: Probing GAC for highest service version." - ID_FUSLOG_BINDING_BEHAVIOR_ORDER_INDEPENDENT L"LOG: Probing GAC for order-independent assembly version." - ID_FUSLOG_BINDING_BEHAVIOR_BEST_MATCH L"LOG: Probing GAC for best-matching assembly version." - - ID_FUSLOG_BINDING_LOG_WHERE_REF_NAME L"LOG: Display name in codebase = " - ID_FUSLOG_BINDING_LOG_NATIVE_ACTIVATION L"LOG: Mixed-mode assembly bind via native activation. No servicing is possible." - ID_FUSLOG_BINDING_LOG_INSPECTION_ONLY_BIND L"LOG: Inspection-only bind." - ID_FUSLOG_BINDING_LOG_RETARGETED L"LOG: Retarget: %s retargeted to %s" - ID_FUSLOG_BINDING_LOG_ERRONOUS_MANIFEST_ENTRY L"LOG: Erronous manifest entry. Declared as %s but found %s" - ID_FUSLOG_BINDING_LOG_PATH_ATTEMPT L"LOG: Attempting path %s" - - ID_FUSLOG_BINDING_HEADER_BEGIN L"*** Assembly Binder Log Entry %s ***" - ID_FUSLOG_BINDING_HEADER_BIND_RESULT L"Bind result: hr = %s" - ID_FUSLOG_BINDING_HEADER_BIND_RESULT_SUCCESS L"The operation was successful." - ID_FUSLOG_BINDING_HEADER_BIND_RESULT_ERROR L"The operation failed." - ID_FUSLOG_BINDING_HEADER_END L"--- A detailed log follows." -END - diff --git a/src/coreclr/src/dlls/mscorrc/fusres.h b/src/coreclr/src/dlls/mscorrc/fusres.h deleted file mode 100644 index 6d6ddd1e9fd3b902d6208f4510b1f9d9f0f4af56..0000000000000000000000000000000000000000 --- a/src/coreclr/src/dlls/mscorrc/fusres.h +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -#ifndef __FUSION_RESOURCE_H_ -#define __FUSION_RESOURCE_H_ - - -// we have 10000 to 10125 available (and more) -// Used are 10000 to 10042 -#define ID_FUSLOG_MANIFEST_FAILURE_NO_FILE 10001 -#define ID_FUSLOG_MANIFEST_FAILURE_PARSE_ERROR 10002 -#define ID_FUSLOG_MANIFEST_FAILURE_UNKNOWN_ERROR 10003 -#define ID_FUSLOG_MANIFEST_FAILURE_EMPTY_DEFAULT 10004 -#define ID_FUSLOG_MANIFEST_STATUS_STATE_CONFIGURED 10006 -#define ID_FUSLOG_MANIFEST_STATUS_STATE_INHERITED 10007 - -#define ID_FUSLOG_ASSEMBLY_STATUS_BOUND_TO_ID 10008 -#define ID_FUSLOG_ASSEMBLY_STATUS_BOUND_TO_LOCATION 10043 -#define ID_FUSLOG_ASSEMBLY_STATUS_BOUND_GAC 10009 -#define ID_FUSLOG_ASSEMBLY_STATUS_BOUND_HAS 10010 -#define ID_FUSLOG_ASSEMBLY_STATUS_BOUND_BYTE_ARRAY 10011 - -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_BEGIN 10012 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_BY_NAME 10013 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_BY_NAME_PARTIAL 10014 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_WHERE_REF 10015 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_CALLER 10016 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_CALLER_UNKNOWN 10017 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_USER 10018 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_USER_UNKNOWN 10019 -#define ID_FUSLOG_BINDING_PRE_BIND_STATE_END 10020 - -#define ID_FUSLOG_BINDING_LOCKED_UNLOCKED 10021 -#define ID_FUSLOG_BINDING_LOCKED_ASSEMBLY_EXE_CONTEXT 10022 -#define ID_FUSLOG_BINDING_LOCKED_ASSEMBLY_INS_CONTEXT 10023 -#define ID_FUSLOG_BINDING_LOCKED_MT_EXE_LOCKED_ENTRY 10024 -#define ID_FUSLOG_BINDING_LOCKED_MT_EXE_LOCALI_ENTRY 10025 -#define ID_FUSLOG_BINDING_LOCKED_MT_EXE_CBASE_ENTRY 10026 -#define ID_FUSLOG_BINDING_LOCKED_MT_INS_LOCKED_ENTRY 10027 -#define ID_FUSLOG_BINDING_LOCKED_MT_INS_LOCALI_ENTRY 10028 -#define ID_FUSLOG_BINDING_LOCKED_MT_INS_CBASE_ENTRY 10005 - -#define ID_FUSLOG_BINDING_BEHAVIOR_STATIC 10029 -#define ID_FUSLOG_BINDING_BEHAVIOR_ORDER_INDEPENDENT 10030 -#define ID_FUSLOG_BINDING_BEHAVIOR_BEST_MATCH 10031 - -#define ID_FUSLOG_BINDING_LOG_WHERE_REF_NAME 10032 -#define ID_FUSLOG_BINDING_LOG_NATIVE_ACTIVATION 10033 -#define ID_FUSLOG_BINDING_LOG_INSPECTION_ONLY_BIND 10034 -#define ID_FUSLOG_BINDING_LOG_RETARGETED 10035 -#define ID_FUSLOG_BINDING_LOG_ERRONOUS_MANIFEST_ENTRY 10036 -#define ID_FUSLOG_BINDING_LOG_PATH_ATTEMPT 10037 - -#define ID_FUSLOG_BINDING_HEADER_BEGIN 10038 -#define ID_FUSLOG_BINDING_HEADER_BIND_RESULT 10039 -#define ID_FUSLOG_BINDING_HEADER_BIND_RESULT_SUCCESS 10040 -#define ID_FUSLOG_BINDING_HEADER_BIND_RESULT_ERROR 10041 -#define ID_FUSLOG_BINDING_HEADER_END 10042 - - -#endif // __FUSION_RESOURCE_H_ diff --git a/src/coreclr/src/dlls/mscorrc/include.rc b/src/coreclr/src/dlls/mscorrc/include.rc index 50c7c779ae47db5e9e20dd85b3ea963f76fcc80f..dfd5d0b379a8bdd4843912be479ff00d05fd1580 100644 --- a/src/coreclr/src/dlls/mscorrc/include.rc +++ b/src/coreclr/src/dlls/mscorrc/include.rc @@ -3,4 +3,3 @@ // See the LICENSE file in the project root for more information. #include "mscorrc.rc" -#include "fuslog.rc" diff --git a/src/coreclr/src/inc/clrconfigvalues.h b/src/coreclr/src/inc/clrconfigvalues.h index 1545387ff682f6c4b9291b8905ebbf164880cc91..e0ce6f39052b18951cd7584851a22448aa2ddb0a 100644 --- a/src/coreclr/src/inc/clrconfigvalues.h +++ b/src/coreclr/src/inc/clrconfigvalues.h @@ -439,7 +439,6 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_InterpreterFallback, W("InterpreterFallback"), /// Loader /// CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_APIThreadStress, W("APIThreadStress"), "Used to test Loader for race conditions") -RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(EXTERNAL_ForceLog, W("ForceLog"), "Fusion flag to enforce assembly binding log. Heavily used and documented in MSDN and BLOGS.") RETAIL_CONFIG_STRING_INFO(INTERNAL_WinMDPath, W("WinMDPath"), "Path for Windows WinMD files") /// @@ -461,7 +460,6 @@ CONFIG_STRING_INFO_EX(INTERNAL_LogFile, W("LogFile"), "Specifies a file name for CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_LogFileAppend, W("LogFileAppend"), "Specifies whether to append to or replace the CLR log file.") CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_LogFlushFile, W("LogFlushFile"), "Specifies whether to flush the CLR log file on each write.") RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(EXTERNAL_LogLevel, W("LogLevel"), "4=10 msgs, 9=1000000, 10=everything") -RETAIL_CONFIG_STRING_INFO_DIRECT_ACCESS(INTERNAL_LogPath, W("LogPath"), "?Fusion debug log path.") RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_LogToConsole, W("LogToConsole"), "Writes the CLR log to console.") CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_LogToDebugger, W("LogToDebugger"), "Writes the CLR log to debugger (OutputDebugStringA).") CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_LogToFile, W("LogToFile"), "Writes the CLR log to a file.") diff --git a/src/coreclr/src/pal/inc/strsafe.h b/src/coreclr/src/pal/inc/strsafe.h index b0fbd004a2daa72228d5208eb7383cdee698d506..fb9a8e1caaa3003671505f7aeb7fe302f36d054e 100644 --- a/src/coreclr/src/pal/inc/strsafe.h +++ b/src/coreclr/src/pal/inc/strsafe.h @@ -236,123 +236,6 @@ STRSAFEAPI StringCchCopyW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc) #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS - -#ifndef STRSAFE_NO_CB_FUNCTIONS -/*++ - -STDAPI StringCbCopy(LPTSTR pszDest, - size_t cbDest, - LPCTSTR pszSrc); - -Routine Description: - - This routine is a safer version of the C built-in function 'strcpy'. - The size of the destination buffer (in bytes) is a parameter and this - function will not write past the end of this buffer and it will ALWAYS - null terminate the destination buffer (unless it is zero length). - - This routine is not a replacement for strncpy. That function will pad the - destination string with extra null termination characters if the count is - greater than the length of the source string, and it will fail to null - terminate the destination string if the source string length is greater - than or equal to the count. You can not blindly use this instead of strncpy: - it is common for code to use it to "patch" strings and you would introduce - errors if the code started null terminating in the middle of the string. - - This function returns a hresult, and not a pointer. It returns a S_OK - if the string was copied without truncation and null terminated, otherwise - it will return a failure code. In failure cases as much of pszSrc will be - copied to pszDest as possible, and pszDest will be null terminated. - -Arguments: - - pszDest - destination string - - cbDest - size of destination buffer in bytes. - length must be = ((_tcslen(src) + 1) * sizeof(TCHAR)) to - hold all of the source including the null terminator - - pszSrc - source string which must be null terminated - -Notes: - Behavior is undefined if source and destination strings overlap. - - pszDest and pszSrc should not be NULL. See StringCbCopyEx if you require - the handling of NULL values. - -Return Value: - - S_OK - if there was source data and it was all copied and the - resultant dest string was null terminated - - failure - you can use the macro HRESULT_CODE() to get a win32 error - code for all hresult falure cases - - STRSAFE_E_INSUFFICIENT_BUFFER / - HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - - this return value is an indication that the copy operation - failed due to insufficient space. When this error occurs, - the destination buffer is modified to contain a truncated - version of the ideal result and is null terminated. This - is useful for situations where truncation is ok - - It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the - return value of this function. - ---*/ - -STRSAFEAPI StringCbCopyA(char* pszDest, size_t cbDest, const char* pszSrc); -STRSAFEAPI StringCbCopyW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc); -#ifdef UNICODE -#define StringCbCopy StringCbCopyW -#else -#define StringCbCopy StringCbCopyA -#endif // !UNICODE - -#ifdef STRSAFE_INLINE -STRSAFEAPI StringCbCopyA(char* pszDest, size_t cbDest, const char* pszSrc) -{ - HRESULT hr; - size_t cchDest; - - // convert to count of characters - cchDest = cbDest / sizeof(char); - - if (cchDest > STRSAFE_MAX_CCH) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyWorkerA(pszDest, cchDest, pszSrc); - } - - return hr; -} - -STRSAFEAPI StringCbCopyW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc) -{ - HRESULT hr; - size_t cchDest; - - // convert to count of characters - cchDest = cbDest / sizeof(WCHAR); - - if (cchDest > STRSAFE_MAX_CCH) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyWorkerW(pszDest, cchDest, pszSrc); - } - - return hr; -} -#endif // STRSAFE_INLINE -#endif // !STRSAFE_NO_CB_FUNCTIONS - - #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ @@ -496,167 +379,6 @@ STRSAFEAPI StringCchCopyExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS - -#ifndef STRSAFE_NO_CB_FUNCTIONS -/*++ - -STDAPI StringCbCopyEx(TCHAR pszDest, - size_t cbDest, - LPCTSTR pszSrc, - LPTSTR* ppszDestEnd, - size_t* pcbRemaining, - DWORD dwFlags); - -Routine Description: - - This routine is a safer version of the C built-in function 'strcpy' with - some additional parameters. In addition to functionality provided by - StringCbCopy, this routine also returns a pointer to the end of the - destination string and the number of bytes left in the destination string - including the null terminator. The flags parameter allows additional controls. - -Arguments: - - pszDest - destination string - - cbDest - size of destination buffer in bytes. - length must be ((_tcslen(pszSrc) + 1) * sizeof(TCHAR)) to - hold all of the source including the null terminator - - pszSrc - source string which must be null terminated - - ppszDestEnd - if ppszDestEnd is non-null, the function will return a - pointer to the end of the destination string. If the - function copied any data, the result will point to the - null termination character - - pcbRemaining - pcbRemaining is non-null,the function will return the - number of bytes left in the destination string, - including the null terminator - - dwFlags - controls some details of the string copy: - - STRSAFE_FILL_BEHIND_NULL - if the function succeeds, the low byte of dwFlags will be - used to fill the uninitialize part of destination buffer - behind the null terminator - - STRSAFE_IGNORE_NULLS - treat NULL string pointers like empty strings (TEXT("")). - this flag is useful for emulating functions like lstrcpy - - STRSAFE_FILL_ON_FAILURE - if the function fails, the low byte of dwFlags will be - used to fill all of the destination buffer, and it will - be null terminated. This will overwrite any truncated - string returned when the failure is - STRSAFE_E_INSUFFICIENT_BUFFER - - STRSAFE_NO_TRUNCATION / - STRSAFE_NULL_ON_FAILURE - if the function fails, the destination buffer will be set - to the empty string. This will overwrite any truncated string - returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. - -Notes: - Behavior is undefined if source and destination strings overlap. - - pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag - is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc - may be NULL. An error may still be returned even though NULLS are ignored - due to insufficient space. - -Return Value: - - S_OK - if there was source data and it was all copied and the - resultant dest string was null terminated - - failure - you can use the macro HRESULT_CODE() to get a win32 error - code for all falure cases - - STRSAFE_E_INSUFFICIENT_BUFFER / - HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - - this return value is an indication that the copy operation - failed due to insufficient space. When this error occurs, - the destination buffer is modified to contain a truncated - version of the ideal result and is null terminated. This - is useful for situations where truncation is ok. - - It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the - return value of this function - ---*/ - -STRSAFEAPI StringCbCopyExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); -STRSAFEAPI StringCbCopyExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); -#ifdef UNICODE -#define StringCbCopyEx StringCbCopyExW -#else -#define StringCbCopyEx StringCbCopyExA -#endif // !UNICODE - -#ifdef STRSAFE_INLINE -STRSAFEAPI StringCbCopyExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) -{ - HRESULT hr; - size_t cchDest; - size_t cchRemaining = 0; - - cchDest = cbDest / sizeof(char); - - if (cchDest > STRSAFE_MAX_CCH) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags); - } - - if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) - { - if (pcbRemaining) - { - // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 - *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); - } - } - - return hr; -} - -STRSAFEAPI StringCbCopyExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) -{ - HRESULT hr; - size_t cchDest; - size_t cchRemaining = 0; - - cchDest = cbDest / sizeof(WCHAR); - - if (cchDest > STRSAFE_MAX_CCH) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags); - } - - if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) - { - if (pcbRemaining) - { - // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 - *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); - } - } - - return hr; -} -#endif // STRSAFE_INLINE -#endif // !STRSAFE_NO_CB_FUNCTIONS - - #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ @@ -766,129 +488,6 @@ STRSAFEAPI StringCchCopyNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS - -#ifndef STRSAFE_NO_CB_FUNCTIONS -/*++ - -STDAPI StringCbCopyN(LPTSTR pszDest, - size_t cbDest, - LPCTSTR pszSrc, - size_t cbSrc); - -Routine Description: - - This routine is a safer version of the C built-in function 'strncpy'. - The size of the destination buffer (in bytes) is a parameter and this - function will not write past the end of this buffer and it will ALWAYS - null terminate the destination buffer (unless it is zero length). - - This routine is meant as a replacement for strncpy, but it does behave - differently. This function will not pad the destination buffer with extra - null termination characters if cbSrc is greater than the size of pszSrc. - - This function returns a hresult, and not a pointer. It returns a S_OK - if the entire string or the first cbSrc characters were copied without - truncation and the resultant destination string was null terminated, otherwise - it will return a failure code. In failure cases as much of pszSrc will be - copied to pszDest as possible, and pszDest will be null terminated. - -Arguments: - - pszDest - destination string - - cbDest - size of destination buffer in bytes. - length must be = ((_tcslen(src) + 1) * sizeof(TCHAR)) to - hold all of the source including the null terminator - - pszSrc - source string - - cbSrc - maximum number of bytes to copy from source string - -Notes: - Behavior is undefined if source and destination strings overlap. - - pszDest and pszSrc should not be NULL. See StringCbCopyEx if you require - the handling of NULL values. - -Return Value: - - S_OK - if there was source data and it was all copied and the - resultant dest string was null terminated - - failure - you can use the macro HRESULT_CODE() to get a win32 error - code for all hresult falure cases - - STRSAFE_E_INSUFFICIENT_BUFFER / - HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - - this return value is an indication that the copy operation - failed due to insufficient space. When this error occurs, - the destination buffer is modified to contain a truncated - version of the ideal result and is null terminated. This - is useful for situations where truncation is ok - - It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the - return value of this function. - ---*/ - -STRSAFEAPI StringCbCopyNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc); -STRSAFEAPI StringCbCopyNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc); -#ifdef UNICODE -#define StringCbCopyN StringCbCopyNW -#else -#define StringCbCopyN StringCbCopyNA -#endif // !UNICODE - -#ifdef STRSAFE_INLINE -STRSAFEAPI StringCbCopyNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc) -{ - HRESULT hr; - size_t cchDest; - size_t cchSrc; - - // convert to count of characters - cchDest = cbDest / sizeof(char); - cchSrc = cbSrc / sizeof(char); - - if ((cchDest > STRSAFE_MAX_CCH) || - (cchSrc > STRSAFE_MAX_CCH)) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyNWorkerA(pszDest, cchDest, pszSrc, cchSrc); - } - - return hr; -} - -STRSAFEAPI StringCbCopyNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc) -{ - HRESULT hr; - size_t cchDest; - size_t cchSrc; - - // convert to count of characters - cchDest = cbDest / sizeof(WCHAR); - cchSrc = cbSrc / sizeof(WCHAR); - - if ((cchDest > STRSAFE_MAX_CCH) || - (cchSrc > STRSAFE_MAX_CCH)) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyNWorkerW(pszDest, cchDest, pszSrc, cchSrc); - } - - return hr; -} -#endif // STRSAFE_INLINE -#endif // !STRSAFE_NO_CB_FUNCTIONS - - #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ @@ -1044,180 +643,6 @@ STRSAFEAPI StringCchCopyNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc #endif // !STRSAFE_NO_CCH_FUNCTIONS -#ifndef STRSAFE_NO_CB_FUNCTIONS -/*++ - -STDAPI StringCbCopyNEx(TCHAR pszDest, - size_t cbDest, - LPCTSTR pszSrc, - size_t cbSrc, - LPTSTR* ppszDestEnd, - size_t* pcbRemaining, - DWORD dwFlags); - -Routine Description: - - This routine is a safer version of the C built-in function 'strncpy' with - some additional parameters. In addition to functionality provided by - StringCbCopyN, this routine also returns a pointer to the end of the - destination string and the number of bytes left in the destination string - including the null terminator. The flags parameter allows additional controls. - - This routine is meant as a replacement for strncpy, but it does behave - differently. This function will not pad the destination buffer with extra - null termination characters if cbSrc is greater than the size of pszSrc. - -Arguments: - - pszDest - destination string - - cbDest - size of destination buffer in bytes. - length must be ((_tcslen(pszSrc) + 1) * sizeof(TCHAR)) to - hold all of the source including the null terminator - - pszSrc - source string - - cbSrc - maximum number of bytes to copy from source string - - ppszDestEnd - if ppszDestEnd is non-null, the function will return a - pointer to the end of the destination string. If the - function copied any data, the result will point to the - null termination character - - pcbRemaining - pcbRemaining is non-null,the function will return the - number of bytes left in the destination string, - including the null terminator - - dwFlags - controls some details of the string copy: - - STRSAFE_FILL_BEHIND_NULL - if the function succeeds, the low byte of dwFlags will be - used to fill the uninitialize part of destination buffer - behind the null terminator - - STRSAFE_IGNORE_NULLS - treat NULL string pointers like empty strings (TEXT("")). - this flag is useful for emulating functions like lstrcpy - - STRSAFE_FILL_ON_FAILURE - if the function fails, the low byte of dwFlags will be - used to fill all of the destination buffer, and it will - be null terminated. This will overwrite any truncated - string returned when the failure is - STRSAFE_E_INSUFFICIENT_BUFFER - - STRSAFE_NO_TRUNCATION / - STRSAFE_NULL_ON_FAILURE - if the function fails, the destination buffer will be set - to the empty string. This will overwrite any truncated string - returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. - -Notes: - Behavior is undefined if source and destination strings overlap. - - pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag - is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc - may be NULL. An error may still be returned even though NULLS are ignored - due to insufficient space. - -Return Value: - - S_OK - if there was source data and it was all copied and the - resultant dest string was null terminated - - failure - you can use the macro HRESULT_CODE() to get a win32 error - code for all falure cases - - STRSAFE_E_INSUFFICIENT_BUFFER / - HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - - this return value is an indication that the copy operation - failed due to insufficient space. When this error occurs, - the destination buffer is modified to contain a truncated - version of the ideal result and is null terminated. This - is useful for situations where truncation is ok. - - It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the - return value of this function - ---*/ - -STRSAFEAPI StringCbCopyNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); -STRSAFEAPI StringCbCopyNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); -#ifdef UNICODE -#define StringCbCopyNEx StringCbCopyNExW -#else -#define StringCbCopyNEx StringCbCopyNExA -#endif // !UNICODE - - -#ifdef STRSAFE_INLINE -STRSAFEAPI StringCbCopyNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) -{ - HRESULT hr; - size_t cchDest; - size_t cchSrc; - size_t cchRemaining = 0; - - cchDest = cbDest / sizeof(char); - cchSrc = cbSrc / sizeof(char); - - if ((cchDest > STRSAFE_MAX_CCH) || - (cchSrc > STRSAFE_MAX_CCH)) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, &cchRemaining, dwFlags); - } - - if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) - { - if (pcbRemaining) - { - // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 - *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); - } - } - - return hr; -} - -STRSAFEAPI StringCbCopyNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) -{ - HRESULT hr; - size_t cchDest; - size_t cchSrc; - size_t cchRemaining = 0; - - cchDest = cbDest / sizeof(WCHAR); - cchSrc = cbSrc / sizeof(WCHAR); - - if ((cchDest > STRSAFE_MAX_CCH) || - (cchSrc > STRSAFE_MAX_CCH)) - { - hr = STRSAFE_E_INVALID_PARAMETER; - } - else - { - hr = StringCopyNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, &cchRemaining, dwFlags); - } - - if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) - { - if (pcbRemaining) - { - // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 - *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); - } - } - - return hr; -} -#endif // STRSAFE_INLINE -#endif // !STRSAFE_NO_CB_FUNCTIONS - - #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ diff --git a/src/coreclr/src/vm/.vscode/c_cpp_properties.json b/src/coreclr/src/vm/.vscode/c_cpp_properties.json index e1b9c05f6e9885f119af1d4510a722c5139d193b..2dc2f5cbe4f606fdecd4da0954e9ffb3146bcdaf 100644 --- a/src/coreclr/src/vm/.vscode/c_cpp_properties.json +++ b/src/coreclr/src/vm/.vscode/c_cpp_properties.json @@ -79,7 +79,6 @@ "FEATURE_USE_ASM_GC_WRITE_BARRIERS", "FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP", "FEATURE_UTF8STRING=1", - "FEATURE_VERSIONING_LOG", "FEATURE_WIN32_REGISTRY", "FEATURE_WINMD_RESILIENT", "PLATFORM_WINDOWS=1", diff --git a/src/coreclr/src/vm/coreassemblyspec.cpp b/src/coreclr/src/vm/coreassemblyspec.cpp index effc034b9d55347dc1fc58930c42ae0cfe12b762..acdf46d189d641e977d621a8f507e4ef3ad7c26f 100644 --- a/src/coreclr/src/vm/coreassemblyspec.cpp +++ b/src/coreclr/src/vm/coreassemblyspec.cpp @@ -35,17 +35,6 @@ #include "../binder/inc/applicationcontext.hpp" #ifndef DACCESS_COMPILE -STDAPI BinderGetImagePath(PEImage *pPEImage, - SString &imagePath) -{ - HRESULT hr = S_OK; - - _ASSERTE(pPEImage != NULL); - - imagePath.Set(pPEImage->GetPath()); - return hr; -} - STDAPI BinderAddRefPEImage(PEImage *pPEImage) { HRESULT hr = S_OK; @@ -70,21 +59,6 @@ STDAPI BinderReleasePEImage(PEImage *pPEImage) return hr; } -STDAPI BinderGetDisplayName(PEAssembly *pAssembly, - SString &displayName) -{ - HRESULT hr = S_OK; - - if (pAssembly != NULL) - { - pAssembly->GetDisplayName(displayName, ASM_DISPLAYF_FULL); - } - - return hr; -} - - - static VOID ThrowLoadError(AssemblySpec * pSpec, HRESULT hr) { CONTRACTL diff --git a/src/coreclr/src/vm/crossgen/CMakeLists.txt b/src/coreclr/src/vm/crossgen/CMakeLists.txt index f236398c62b1989c8fb7e3967a9a9cb3f5dc1fc0..0e994715f78e861ae04306ec4d8af58ea94b0bae 100644 --- a/src/coreclr/src/vm/crossgen/CMakeLists.txt +++ b/src/coreclr/src/vm/crossgen/CMakeLists.txt @@ -276,7 +276,6 @@ target_compile_definitions(mscorlib_crossgen EnC_SUPPORTED FEATURE_EVENT_TRACE FEATURE_MULTICOREJIT - FEATURE_VERSIONING_LOG CROSSGEN_MSCORLIB) set_target_properties(mscorlib_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)