Skip to content

Delete DomainAssembly #108618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/coreclr/debug/daccess/daccess.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: daccess.cpp
//

//
// ClrDataAccess implementation.
//
//*****************************************************************************

#include "stdafx.h"
Expand Down
154 changes: 74 additions & 80 deletions src/coreclr/debug/daccess/dacdbiimpl.cpp

Large diffs are not rendered by default.

35 changes: 17 additions & 18 deletions src/coreclr/debug/daccess/dacdbiimpl.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// DacDbiImpl.h
//

//
// Implement the interface between the DAC and DBI.
//*****************************************************************************
Expand Down Expand Up @@ -96,15 +95,15 @@ class DacDbiInterfaceImpl :
IStringHolder * pStrName);

// Get the values of the JIT Optimization and EnC flags.
void GetCompilerFlags (VMPTR_DomainAssembly vmDomainAssembly,
void GetCompilerFlags (VMPTR_Assembly vmAssembly,
BOOL * pfAllowJITOpts,
BOOL * pfEnableEnC);

// Helper function for SetCompilerFlags to set EnC status
bool CanSetEnCBits(Module * pModule);

// Set the values of the JIT optimization and EnC flags.
HRESULT SetCompilerFlags(VMPTR_DomainAssembly vmDomainAssembly,
HRESULT SetCompilerFlags(VMPTR_Assembly vmAssembly,
BOOL fAllowJitOpts,
BOOL fEnableEnC);

Expand Down Expand Up @@ -133,7 +132,7 @@ class DacDbiInterfaceImpl :

bool IsValidObject(CORDB_ADDRESS obj);

bool GetAppDomainForObject(CORDB_ADDRESS obj, OUT VMPTR_AppDomain * pApp, OUT VMPTR_Module *pModule, OUT VMPTR_DomainAssembly *mod);
bool GetAppDomainForObject(CORDB_ADDRESS obj, OUT VMPTR_AppDomain * pApp, OUT VMPTR_Module *pModule, OUT VMPTR_Assembly *mod);



Expand Down Expand Up @@ -219,7 +218,7 @@ class DacDbiInterfaceImpl :
// a module and a token. The info will come from a MethodDesc, if
// one exists or from metadata.
//
void GetILCodeAndSig(VMPTR_DomainAssembly vmDomainAssembly,
void GetILCodeAndSig(VMPTR_Assembly vmAssembly,
mdToken functionToken,
TargetBuffer * pCodeInfo,
mdToken * pLocalSigToken);
Expand All @@ -230,7 +229,7 @@ class DacDbiInterfaceImpl :
// whether it's an instantiated generic
// its EnC version number
// hot and cold region information.
void GetNativeCodeInfo(VMPTR_DomainAssembly vmDomainAssembly,
void GetNativeCodeInfo(VMPTR_Assembly vmAssembly,
mdToken functionToken,
NativeCodeFunctionData * pCodeInfo);

Expand Down Expand Up @@ -261,7 +260,7 @@ class DacDbiInterfaceImpl :
ClassInfo * pData);

// get field information and object size for an instantiated generic type
void GetInstantiationFieldInfo (VMPTR_DomainAssembly vmDomainAssembly,
void GetInstantiationFieldInfo (VMPTR_Assembly vmAssembly,
VMPTR_TypeHandle vmThExact,
VMPTR_TypeHandle vmThApprox,
DacDbiArrayList<FieldData> * pFieldList,
Expand Down Expand Up @@ -337,7 +336,7 @@ class DacDbiInterfaceImpl :
CorElementType simpleType,
mdTypeDef * pMetadataToken,
VMPTR_Module * pVmModule,
VMPTR_DomainAssembly * pVmDomainAssembly);
VMPTR_Assembly * pVmAssembly);

BOOL IsExceptionObject(VMPTR_Object vmObject);

Expand All @@ -353,7 +352,7 @@ class DacDbiInterfaceImpl :
HRESULT GetDelegateFunctionData(
DelegateType delegateType,
VMPTR_Object delegateObject,
OUT VMPTR_DomainAssembly *ppFunctionDomainAssembly,
OUT VMPTR_Assembly *ppFunctionAssembly,
OUT mdMethodDef *pMethodDef);

HRESULT GetDelegateTargetObject(
Expand Down Expand Up @@ -702,10 +701,10 @@ class DacDbiInterfaceImpl :
BOOL GetAssemblyPath(VMPTR_Assembly vmAssembly,
IStringHolder * pStrFilename);

void GetAssemblyFromDomainAssembly(VMPTR_DomainAssembly vmDomainAssembly, VMPTR_Assembly *vmAssembly);
void GetAssemblyFromRootAssembly(VMPTR_Assembly vmRootAssembly, VMPTR_Assembly *vmAssembly);

// Determines whether the runtime security system has assigned full-trust to this assembly.
BOOL IsAssemblyFullyTrusted(VMPTR_DomainAssembly vmDomainAssembly);
BOOL IsAssemblyFullyTrusted(VMPTR_Assembly vmAssembly);

// get a type def resolved across modules
void ResolveTypeReference(const TypeRefData * pTypeRefInfo,
Expand All @@ -731,10 +730,10 @@ class DacDbiInterfaceImpl :
// Gets properties for a module
void GetModuleData(VMPTR_Module vmModule, ModuleInfo * pData);

// Gets properties for a domain assembly
void GetDomainAssemblyData(VMPTR_DomainAssembly vmDomainAssembly, DomainAssemblyInfo * pData);
// Gets properties for an assembly
void GetRuntimeAssemblyData(VMPTR_Assembly vmAssembly, AssemblyInfo * pData);

void GetModuleForDomainAssembly(VMPTR_DomainAssembly vmDomainAssembly, OUT VMPTR_Module * pModule);
void GetModuleForRuntimeAssembly(VMPTR_Assembly vmAssembly, OUT VMPTR_Module * pModule);

// Yields true if the address is a CLR stub.
BOOL IsTransitionStub(CORDB_ADDRESS address);
Expand All @@ -754,7 +753,7 @@ class DacDbiInterfaceImpl :

// Enumerate the moduels in the given assembly.
void EnumerateModulesInAssembly(
VMPTR_DomainAssembly vmAssembly,
VMPTR_Assembly vmAssembly,
FP_MODULE_ENUMERATION_CALLBACK fpCallback,
void * pUserData
);
Expand Down Expand Up @@ -830,8 +829,8 @@ class DacDbiInterfaceImpl :
// Return the current appdomain the specified thread is in.
VMPTR_AppDomain GetCurrentAppDomain(VMPTR_Thread vmThread);

// Given an assembly ref token and metadata scope (via the DomainAssembly), resolve the assembly.
VMPTR_DomainAssembly ResolveAssembly(VMPTR_DomainAssembly vmScope, mdToken tkAssemblyRef);
// Given an assembly ref token and metadata scope (via the runtime assembly), resolve the assembly.
VMPTR_Assembly ResolveAssembly(VMPTR_Assembly vmScope, mdToken tkAssemblyRef);


// Hijack the thread
Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/debug/daccess/dacdbiimpl.inl
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// DacDbiImpl.inl
//

//
// Inline functions for DacDbiImpl.h
//
//*****************************************************************************

#ifndef _DACDBI_IMPL_INL_
Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/debug/daccess/dacdbiimpllocks.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: DacDbiImplLocks.cpp
//

//
// Implement DAC/DBI interface for testing our ability to detect when the LS
// holds a lock that we encounter while executing in the DAC.
//
//*****************************************************************************

#include "stdafx.h"
Expand Down
22 changes: 10 additions & 12 deletions src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
// DacDbiImplStackWalk.cpp
//

//*****************************************************************************
// File: DacDbiImplStackWalk.cpp
//
// This file contains the implementation of the stackwalking-related functions on the DacDbiInterface.
//
// ======================================================================================

#include "stdafx.h"
Expand Down Expand Up @@ -575,22 +573,22 @@ void DacDbiInterfaceImpl::EnumerateInternalFrames(VMPTR_Thread
#endif // FEATURE_COMINTEROP

Module * pModule = (pMD ? pMD->GetModule() : NULL);
DomainAssembly * pDomainAssembly = (pModule ? pModule->GetDomainAssembly() : NULL);
Assembly * pAssembly = (pModule ? pModule->GetAssembly() : NULL);

if (frameData.stubFrame.frameType == STUBFRAME_FUNC_EVAL)
{
FuncEvalFrame * pFEF = dac_cast<PTR_FuncEvalFrame>(pFrame);
DebuggerEval * pDE = pFEF->GetDebuggerEval();

frameData.stubFrame.funcMetadataToken = pDE->m_methodToken;
frameData.stubFrame.vmDomainAssembly.SetHostPtr(
pDE->m_debuggerModule ? pDE->m_debuggerModule->GetDomainAssembly() : NULL);
frameData.stubFrame.vmAssembly.SetHostPtr(
pDE->m_debuggerModule ? pDE->m_debuggerModule->GetAssembly() : NULL);
frameData.stubFrame.vmMethodDesc = VMPTR_MethodDesc::NullPtr();
}
else
{
frameData.stubFrame.funcMetadataToken = (pMD == NULL ? mdTokenNil : pMD->GetMemberDef());
frameData.stubFrame.vmDomainAssembly.SetHostPtr(pDomainAssembly);
frameData.stubFrame.vmAssembly.SetHostPtr(pAssembly);
frameData.stubFrame.vmMethodDesc.SetHostPtr(pMD);
}

Expand Down Expand Up @@ -767,11 +765,11 @@ void DacDbiInterfaceImpl::InitFrameData(StackFrameIterator * pIter,
// Although MiniDumpNormal tries to dump all AppDomains, it's possible
// target corruption will keep one from being present. This should mean
// we'll just fail later, but struggle on for now.
DomainAssembly *pDomainAssembly = NULL;
Assembly *pAssembly = NULL;
EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY
{
pDomainAssembly = (pModule ? pModule->GetDomainAssembly() : NULL);
_ASSERTE(pDomainAssembly != NULL);
pAssembly = (pModule ? pModule->GetAssembly() : NULL);
_ASSERTE(pAssembly != NULL);
}
EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY

Expand Down Expand Up @@ -848,7 +846,7 @@ void DacDbiInterfaceImpl::InitFrameData(StackFrameIterator * pIter,
//

pFuncData->funcMetadataToken = pMD->GetMemberDef();
pFuncData->vmDomainAssembly.SetHostPtr(pDomainAssembly);
pFuncData->vmAssembly.SetHostPtr(pAssembly);

// PERF: this is expensive to get so I stopped fetching it eagerly
// It is only needed if we haven't already got a cached copy
Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/debug/daccess/dacfn.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: dacfn.cpp
//

//
// Dac function implementations.
//
//*****************************************************************************

#include "stdafx.h"
Expand Down
5 changes: 1 addition & 4 deletions src/coreclr/debug/daccess/dacimpl.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: dacimpl.h
//

//
// Central header file for external data access implementation.
//
//*****************************************************************************


#ifndef __DACIMPL_H__
#define __DACIMPL_H__

Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/debug/daccess/datatargetadapter.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// DataTargetAdapter.cpp
//

//
// implementation of compatibility adapter for ICLRDataTarget
//*****************************************************************************
Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/debug/daccess/datatargetadapter.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// DataTargetAdapter.h
//

//
// header for compatibility adapter for ICLRDataTarget
//*****************************************************************************
Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/debug/daccess/enummem.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: enummem.cpp
//

//
// ICLRDataEnumMemoryRegions implementation.
//
//*****************************************************************************

#include "stdafx.h"
Expand Down
7 changes: 1 addition & 6 deletions src/coreclr/debug/daccess/fntableaccess.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ===========================================================================

//
// ===========================================================================
// File: DebugSupport.cpp
//
// Support routines for debugging the CLR
Expand All @@ -13,12 +12,8 @@
#ifndef TARGET_UNIX
#ifndef TARGET_X86

//
//
// @TODO: This is old code that should be easy to implement on top of the existing DAC support.
// This code was originally written prior to DAC.
//
//

#include <winwrap.h>
#include <windows.h>
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/debug/daccess/fntableaccess.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//

#ifdef _MSC_VER
#pragma once
#endif
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/debug/daccess/gcinterface.dac.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#ifndef __DACCESS_GCINTERFACE_DAC_H__
#define __DACCESS_GCINTERFACE_DAC_H__

Expand Down
5 changes: 1 addition & 4 deletions src/coreclr/debug/daccess/inspect.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: inspect.cpp
//

//
// ClrData object inspection.
//
//*****************************************************************************

#include "stdafx.h"


HRESULT
InitFieldIter(DeepFieldDescIterator* fieldIter,
TypeHandle typeHandle,
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/debug/daccess/nidump.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.


//
/*vim: set foldmethod=marker: */
#include <stdafx.h>

Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/debug/daccess/reimpl.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//*****************************************************************************
// File: reimpl.cpp
//

//
// Data-access-specific reimplementations of standard code.
//
//*****************************************************************************

#include "stdafx.h"
Expand Down
Loading
Loading