From d150225b706299822534421f545b0a0b4c9f814a Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Thu, 8 Dec 2022 10:01:13 -0800 Subject: [PATCH] Delete some remnants from fusion (#79380) --- src/coreclr/debug/ee/debugger.cpp | 89 ----------------- src/coreclr/debug/ee/debugger.h | 7 -- src/coreclr/inc/dlwrap.h | 152 ------------------------------ src/coreclr/vm/assembly.hpp | 11 --- src/coreclr/vm/ceeload.h | 3 - src/coreclr/vm/peassembly.cpp | 1 - 6 files changed, 263 deletions(-) diff --git a/src/coreclr/debug/ee/debugger.cpp b/src/coreclr/debug/ee/debugger.cpp index 3152a507a1ce25..e5b8fdea206666 100644 --- a/src/coreclr/debug/ee/debugger.cpp +++ b/src/coreclr/debug/ee/debugger.cpp @@ -10440,16 +10440,6 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent) // the RS sends a single-attaching event and attaches at the first response from the Left-side. StartCanaryThread(); - // In V3 after attaching event was handled we iterate throughout all ADs and made shadow copies of PDBs in the BIN directories. - // After all AppDomain, DomainAssembly and modules iteration was available in out-of-process model in V4 the code that enables - // PDBs to be copied was not called at attach time. - // Eliminating PDBs copying side effect is an issue: Dev10 #927143 - EX_TRY - { - IterateAppDomainsForPdbs(); - } - EX_CATCH_HRESULT(hr); // ignore failures - if (m_jitAttachInProgress) { // For jit-attach, mark that we're attached now. @@ -14674,85 +14664,6 @@ HRESULT Debugger::UpdateAppDomainEntryInIPC(AppDomain *pAppDomain) return hr; } -HRESULT Debugger::CopyModulePdb(Module* pRuntimeModule) -{ - CONTRACTL - { - THROWS; - MAY_DO_HELPER_THREAD_DUTY_GC_TRIGGERS_CONTRACT; - - PRECONDITION(ThisIsHelperThread()); - MODE_ANY; - } - CONTRACTL_END; - - if (!pRuntimeModule->IsVisibleToDebugger()) - { - return S_OK; - } - - HRESULT hr = S_OK; - - return hr; -} - -/****************************************************************************** - * When attaching to a process, this is called to enumerate all of the - * AppDomains currently in the process and allow modules pdbs to be copied over to the shadow dir maintaining out V2 in-proc behaviour. - ******************************************************************************/ -HRESULT Debugger::IterateAppDomainsForPdbs() -{ - CONTRACTL - { - THROWS; - MAY_DO_HELPER_THREAD_DUTY_GC_TRIGGERS_CONTRACT; - - PRECONDITION(ThisIsHelperThread()); - MODE_ANY; - } - CONTRACTL_END; - - STRESS_LOG0(LF_CORDB, LL_INFO100, "Entered function IterateAppDomainsForPdbs()\n"); - HRESULT hr = S_OK; - - // Lock the list - if (!m_pAppDomainCB->Lock()) - return (E_FAIL); - - // Iterate through the app domains - AppDomainInfo *pADInfo = m_pAppDomainCB->FindFirst(); - - while (pADInfo) - { - STRESS_LOG2(LF_CORDB, LL_INFO100, "Iterating over domain AD:%#08x %ls\n", pADInfo->m_pAppDomain, pADInfo->m_szAppDomainName); - - AppDomain::AssemblyIterator i; - i = pADInfo->m_pAppDomain->IterateAssembliesEx((AssemblyIterationFlags)(kIncludeLoaded | kIncludeLoading | kIncludeExecution)); - CollectibleAssemblyHolder pDomainAssembly; - while (i.Next(pDomainAssembly.This())) - { - if (!pDomainAssembly->IsVisibleToDebugger()) - continue; - - if (pDomainAssembly->ShouldNotifyDebugger()) - { - CopyModulePdb(pDomainAssembly->GetModule()); - } - } - - // Get the next appdomain in the list - pADInfo = m_pAppDomainCB->FindNext(pADInfo); - } - - // Unlock the list - m_pAppDomainCB->Unlock(); - - STRESS_LOG0(LF_CORDB, LL_INFO100, "Exiting function IterateAppDomainsForPdbs\n"); - - return hr; -} - - /****************************************************************************** * ******************************************************************************/ diff --git a/src/coreclr/debug/ee/debugger.h b/src/coreclr/debug/ee/debugger.h index f73f9c83810dc3..55aa6c6df7e27a 100644 --- a/src/coreclr/debug/ee/debugger.h +++ b/src/coreclr/debug/ee/debugger.h @@ -2257,13 +2257,6 @@ class Debugger : public DebugInterface // a buffer so that it can be read out-of-proc BYTE* SerializeModuleMetaData(Module * pModule, DWORD * countBytes); - /// Wrapps fusion Module FusionCopyPDBs. - HRESULT CopyModulePdb(Module* pRuntimeModule); - - // When attaching to a process, this is called to enumerate all of the - // AppDomains currently in the process and allow modules pdbs to be copied over to the shadow dir maintaining out V2 in-proc behaviour. - HRESULT IterateAppDomainsForPdbs(); - #ifndef DACCESS_COMPILE public: // Helper function to initialize JDI structure diff --git a/src/coreclr/inc/dlwrap.h b/src/coreclr/inc/dlwrap.h index 2385d1c0c6605a..0ce336c11c54a7 100644 --- a/src/coreclr/inc/dlwrap.h +++ b/src/coreclr/inc/dlwrap.h @@ -39,166 +39,14 @@ VerQueryValueW_NoThrow( ); #endif -#if defined(_WININET_) && !defined (CreateUrlCacheEntryW_NoThrow) -__success(return) -BOOL -CreateUrlCacheEntryW_NoThrow( - IN LPCWSTR lpszUrlName, - IN DWORD dwExpectedFileSize, - IN LPCWSTR lpszFileExtension, - _Out_writes_(MAX_LONGPATH+1) LPWSTR lpszFileName, - IN DWORD dwReserved - ); -#endif - -#if defined(_WININET_) && !defined (CommitUrlCacheEntryW_NoThrow) -BOOL -CommitUrlCacheEntryW_NoThrow( - IN LPCWSTR lpszUrlName, - IN LPCWSTR lpszLocalFileName, - IN FILETIME ExpireTime, - IN FILETIME LastModifiedTime, - IN DWORD CacheEntryType, - IN LPCWSTR lpHeaderInfo, - IN DWORD dwHeaderSize, - IN LPCWSTR lpszFileExtension, - IN LPCWSTR lpszOriginalUrl - ); -#endif - -#if defined(_WININET_) && !defined (InternetTimeToSystemTimeA_NoThrow) -BOOL -InternetTimeToSystemTimeA_NoThrow( - IN LPCSTR lpszTime, // NULL terminated string - OUT SYSTEMTIME *pst, // output in GMT time - IN DWORD dwReserved - ); -#endif - -#if defined(__urlmon_h__) && !defined(CoInternetCreateSecurityManager_NoThrow) -HRESULT -CoInternetCreateSecurityManager_NoThrow( - IServiceProvider *pSP, - IInternetSecurityManager **ppSM, - DWORD dwReserved - ); -#endif - -#if defined(__urlmon_h__) && !defined(URLDownloadToCacheFileW_NoThrow) -HRESULT -URLDownloadToCacheFileW_NoThrow( - LPUNKNOWN lpUnkcaller, - LPCWSTR szURL, - _Out_writes_(dwBufLength) LPWSTR szFileName, - DWORD dwBufLength, - DWORD dwReserved, - IBindStatusCallback *pBSC - ); -#endif - -#if defined(__urlmon_h__) && !defined(CoInternetGetSession_NoThrow) -HRESULT -CoInternetGetSession_NoThrow( - WORD dwSessionMode, - IInternetSession **ppIInternetSession, - DWORD dwReserved - ); -#endif - -#if defined(__urlmon_h__) && !defined(CopyBindInfo_NoThrow) -HRESULT -CopyBindInfo_NoThrow( - const BINDINFO * pcbiSrc, BINDINFO * pbiDest - ); -#endif - - - //overrides -#undef InternetTimeToSystemTimeA -#undef CommitUrlCacheEntryW -#undef HttpQueryInfoA -#undef InternetCloseHandle -#undef HttpSendRequestA -#undef HttpOpenRequestA -#undef InternetConnectA -#undef InternetOpenA -#undef InternetReadFile -#undef CreateUrlCacheEntryW -#undef CoInternetGetSession -#undef CopyBindInfo -#undef CoInternetCreateSecurityManager -#undef URLDownloadToCacheFileW -#undef FDICreate -#undef FDIIsCabinet -#undef FDICopy -#undef FDIDestroy #undef VerQueryValueW #undef GetFileVersionInfoW #undef GetFileVersionInfoSizeW -#undef VerQueryValueA -#undef GetFileVersionInfoA -#undef GetFileVersionInfoSizeA - -#define InternetTimeToSystemTimeA InternetTimeToSystemTimeA_NoThrow -#define CommitUrlCacheEntryW CommitUrlCacheEntryW_NoThrow -#define CreateUrlCacheEntryW CreateUrlCacheEntryW_NoThrow -#define CoInternetGetSession CoInternetGetSession_NoThrow -#define CopyBindInfo CopyBindInfo_NoThrow -#define CoInternetCreateSecurityManager CoInternetCreateSecurityManager_NoThrow -#define URLDownloadToCacheFileW URLDownloadToCacheFileW_NoThrow #define VerQueryValueW VerQueryValueW_NoThrow #define GetFileVersionInfoW GetFileVersionInfoW_NoThrow #define GetFileVersionInfoSizeW GetFileVersionInfoSizeW_NoThrow -#define VerQueryValueA Use_VerQueryValueW -#define GetFileVersionInfoA Use_GetFileVersionInfoW -#define GetFileVersionInfoSizeA Use_GetFileVersionInfoSizeW - -#if defined(_WININET_) - inline - HRESULT HrCreateUrlCacheEntryW( - IN LPCWSTR lpszUrlName, - IN DWORD dwExpectedFileSize, - IN LPCWSTR lpszFileExtension, - _Out_writes_(MAX_LONGPATH+1) LPWSTR lpszFileName, - IN DWORD dwReserved - ) - { - if (!CreateUrlCacheEntryW(lpszUrlName, dwExpectedFileSize, lpszFileExtension, lpszFileName, dwReserved)) - { - return HRESULT_FROM_WIN32(GetLastError()); - } - else - { - return S_OK; - } - } - - inline - HRESULT HrCommitUrlCacheEntryW( - IN LPCWSTR lpszUrlName, - IN LPCWSTR lpszLocalFileName, - IN FILETIME ExpireTime, - IN FILETIME LastModifiedTime, - IN DWORD CacheEntryType, - IN LPCWSTR lpHeaderInfo, - IN DWORD dwHeaderSize, - IN LPCWSTR lpszFileExtension, - IN LPCWSTR lpszOriginalUrl - ) - { - if (!CommitUrlCacheEntryW(lpszUrlName, lpszLocalFileName, ExpireTime, LastModifiedTime, CacheEntryType, - lpHeaderInfo, dwHeaderSize, lpszFileExtension, lpszOriginalUrl)) - { - return HRESULT_FROM_WIN32(GetLastError()); - } - else - { - return S_OK; - } - } -#endif // defined(_WININET_) #endif diff --git a/src/coreclr/vm/assembly.hpp b/src/coreclr/vm/assembly.hpp index 8d4cc62b266098..de99463e6f246c 100644 --- a/src/coreclr/vm/assembly.hpp +++ b/src/coreclr/vm/assembly.hpp @@ -29,12 +29,8 @@ class DomainAssembly; class DomainModule; class SystemDomain; class ClassLoader; -class ComDynamicWrite; -class AssemblySink; class AssemblyNative; class AssemblySpec; -class ISharedSecurityDescriptor; -class SecurityTransparencyBehavior; class Pending; class AllocMemTracker; class FriendAssemblyDescriptor; @@ -257,13 +253,6 @@ class Assembly m_debuggerFlags = flags; } - void SetCopiedPDBs() - { - LIMITED_METHOD_CONTRACT; - - m_debuggerFlags = (DebuggerAssemblyControlFlags) (m_debuggerFlags | DACF_PDBS_COPIED); - } - ULONG HashIdentity() { return GetPEAssembly()->HashIdentity(); diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index d5e5395840c326..6be9a6038154e9 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -843,9 +843,6 @@ class Module : public ModuleBase // Set the given bit on m_dwTransientFlags. Return true if we won the race to set the bit. BOOL SetTransientFlagInterlocked(DWORD dwFlag); - // Invoke fusion hooks into host to fetch PDBs - void FetchPdbsFromHost(); - // Cannoically-cased hashtable of the available class names for // case insensitive lookup. Contains pointers into // m_pAvailableClasses. diff --git a/src/coreclr/vm/peassembly.cpp b/src/coreclr/vm/peassembly.cpp index 0faee2e520c907..ba60a8e7cabfc5 100644 --- a/src/coreclr/vm/peassembly.cpp +++ b/src/coreclr/vm/peassembly.cpp @@ -14,7 +14,6 @@ #include "eventtrace.h" #include "dbginterface.h" #include "peimagelayout.inl" -#include "dlwrap.h" #include "invokeutil.h" #include "strongnameinternal.h"