summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorJuan Hoyos <juan.hoyos@microsoft.com>2019-06-26 10:11:56 -0700
committerGitHub <noreply@github.com>2019-06-26 10:11:56 -0700
commit394edf40a089ac3fae5415dba8235b89c7133319 (patch)
treeb345f3742355429ce2ea9d7790fe37b4ee6fe6f3 /src/inc
parentbe31aaea6402390d808fa41d4cd1fa9b68f4cdd0 (diff)
downloadcoreclr-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/inc')
-rw-r--r--src/inc/cordebug.idl34
-rw-r--r--src/inc/corerror.xml6
2 files changed, 40 insertions, 0 deletions
diff --git a/src/inc/cordebug.idl b/src/inc/cordebug.idl
index ce1bf4a49e..c0dcb7670b 100644
--- a/src/inc/cordebug.idl
+++ b/src/inc/cordebug.idl
@@ -6491,6 +6491,40 @@ interface ICorDebugObjectValue2 : IUnknown
[out] ICorDebugType **ppType);
};
+[
+ object,
+ local,
+ uuid(3AF70CC7-6047-47F6-A5C5-090A1A622638),
+ pointer_default(unique)
+]
+interface ICorDebugDelegateObjectValue : IUnknown
+{
+ /*
+ * GetTarget retrieves the object on which the delegate calls the function.
+ * Returns:
+ * - S_OK:
+ * - The ICorDebugReferenceValue object targeted by the function.
+ * - NULL if the delegate function is a static function or an open delegate
+ * - HRESULT CORDBG_E_UNSUPPORTED_DELEGATE for curently unsupported delegates.
+ * In this case, the value of ppObject should not be used. Some of these
+ * include: Secure wrappers, Open Virual delegates.
+ */
+ HRESULT GetTarget([out] ICorDebugReferenceValue **ppObject);
+
+ /*
+ * GetFunction returns the function that gets run by the delegate.
+ * - S_OK:
+ * - The ICorDebugFunction function for the function the delegate would invoke.
+ * - There are a few cases where the ICorDebugFunction can be different from what's expected,
+ * such as generic methods, which won't contain the instantiation.
+ * - HRESULT CORDBG_E_UNSUPPORTED_DELEGATE for curently unsupported delegates.
+ * In this case, the value of ppObject should not be used. Some of these
+ * include: Secure wrappers, Open Virual delegates.
+ */
+ HRESULT GetFunction([out] ICorDebugFunction **ppFunction);
+}
+
+
/*
* ICorDebugBoxValue is a subclass of ICorDebugValue which
* represents a boxed value class object.
diff --git a/src/inc/corerror.xml b/src/inc/corerror.xml
index d8b8f6361e..38efe0d6de 100644
--- a/src/inc/corerror.xml
+++ b/src/inc/corerror.xml
@@ -2183,6 +2183,12 @@
<Comment>Couldn't find a native image.</Comment>
</HRESULT>
+<HRESULT NumericValue="0x80131c68">
+ <SymbolicName>CORDBG_E_UNSUPPORTED_DELEGATE</SymbolicName>
+ <Message>"The delegate contains a delegate currently not supported by the API."</Message>
+ <Comment>The delegate contains a delegate currently not supported by the API.</Comment>
+</HRESULT>
+
<HRESULT NumericValue="0x80131d02">
<SymbolicName>PEFMT_E_64BIT</SymbolicName>
<Message>"File is PE32+."</Message>