Skip to content

Commit

Permalink
Delete some remnants from fusion (#79380)
Browse files Browse the repository at this point in the history
  • Loading branch information
elinor-fung authored Dec 8, 2022
1 parent fb104e3 commit d150225
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 263 deletions.
89 changes: 0 additions & 89 deletions src/coreclr/debug/ee/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<DomainAssembly *> 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;
}


/******************************************************************************
*
******************************************************************************/
Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/debug/ee/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
152 changes: 0 additions & 152 deletions src/coreclr/inc/dlwrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

11 changes: 0 additions & 11 deletions src/coreclr/vm/assembly.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
3 changes: 0 additions & 3 deletions src/coreclr/vm/ceeload.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/peassembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "eventtrace.h"
#include "dbginterface.h"
#include "peimagelayout.inl"
#include "dlwrap.h"
#include "invokeutil.h"
#include "strongnameinternal.h"

Expand Down

0 comments on commit d150225

Please sign in to comment.