diff options
author | Juan Hoyos <juan.hoyos@microsoft.com> | 2019-06-26 10:11:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 10:11:56 -0700 |
commit | 394edf40a089ac3fae5415dba8235b89c7133319 (patch) | |
tree | b345f3742355429ce2ea9d7790fe37b4ee6fe6f3 /src/vm | |
parent | be31aaea6402390d808fa41d4cd1fa9b68f4cdd0 (diff) | |
download | coreclr-394edf40a089ac3fae5415dba8235b89c7133319.tar.gz coreclr-394edf40a089ac3fae5415dba8235b89c7133319.tar.bz2 coreclr-394edf40a089ac3fae5415dba8235b89c7133319.zip |
Delegate inspection API in the DBI (#25362)
* Add ICorDebugDelegateObjectValue interfaces
* Expose appropriate HR (CORDBG_E_UNSUPPORTED_DELEGATE)
* Partially DACize DelegateObject
* Add DacDbi method for delegate inspection
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/comdelegate.cpp | 10 | ||||
-rw-r--r-- | src/vm/common.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/vm/comdelegate.cpp b/src/vm/comdelegate.cpp index a7ed685c3e..7ee85b6136 100644 --- a/src/vm/comdelegate.cpp +++ b/src/vm/comdelegate.cpp @@ -1617,6 +1617,9 @@ extern "C" void * _ReturnAddress(void); FCIMPL3(void, COMDelegate::DelegateConstruct, Object* refThisUNSAFE, Object* targetUNSAFE, PCODE method) { FCALL_CONTRACT; + // If you modify this logic, please update DacDbiInterfaceImpl::GetDelegateType, DacDbiInterfaceImpl::GetDelegateType, + // DacDbiInterfaceImpl::GetDelegateFunctionData, and DacDbiInterfaceImpl::GetDelegateTargetObject. + struct _gc { @@ -1785,6 +1788,9 @@ MethodDesc *COMDelegate::GetMethodDesc(OBJECTREF orDelegate) } CONTRACTL_END; + // If you modify this logic, please update DacDbiInterfaceImpl::GetDelegateType, DacDbiInterfaceImpl::GetDelegateType, + // DacDbiInterfaceImpl::GetDelegateFunctionData, and DacDbiInterfaceImpl::GetDelegateTargetObject. + MethodDesc *pMethodHandle = NULL; DELEGATEREF thisDel = (DELEGATEREF) orDelegate; @@ -3060,6 +3066,10 @@ MethodDesc* COMDelegate::GetDelegateCtor(TypeHandle delegateType, MethodDesc *pT // // Another is to pass a gchandle to the delegate ctor. This is fastest, but only works if we can predict the gc handle at this time. // We will use this for the non secure variants + // + // If you modify this logic, please update DacDbiInterfaceImpl::GetDelegateType, DacDbiInterfaceImpl::GetDelegateType, + // DacDbiInterfaceImpl::GetDelegateFunctionData, and DacDbiInterfaceImpl::GetDelegateTargetObject. + if (invokeArgCount == methodArgCount) { diff --git a/src/vm/common.h b/src/vm/common.h index 18044b5b13..6abe996e90 100644 --- a/src/vm/common.h +++ b/src/vm/common.h @@ -153,6 +153,7 @@ typedef DPTR(class NDirectMethodDesc) PTR_NDirectMethodDesc; typedef VPTR(class Thread) PTR_Thread; typedef DPTR(class Object) PTR_Object; typedef DPTR(PTR_Object) PTR_PTR_Object; +typedef DPTR(class DelegateObject) PTR_DelegateObject; typedef DPTR(class ObjHeader) PTR_ObjHeader; typedef DPTR(class Precode) PTR_Precode; typedef VPTR(class ReflectionModule) PTR_ReflectionModule; |