In case of evaluation timeout we abort evaluation by "abort" feature with meaning, that evaluation is failed. But in case of successful evaluation abort, runtime return CORDBG_S_FUNC_EVAL_ABORTED successful return code.
HRESULT Status;
ToRelease<ICorDebugEval2> pEval2;
IfFailRet(pEval->QueryInterface(IID_ICorDebugEval2, (LPVOID*) &pEval2));
- IfFailRet(Status = pEval2->CallParameterizedFunction(
+ IfFailRet(pEval2->CallParameterizedFunction(
pFunc,
static_cast<uint32_t>(typeParams.size()),
(ICorDebugType **)typeParams.data(),
};\r
HRESULT ret = WaitResult();\r
\r
- // TODO Let user know we have timed out evaluation, provide "Evaluation timed out." message.\r
+ if (ret == CORDBG_S_FUNC_EVAL_ABORTED)\r
+ ret = COR_E_TIMEOUT;\r
\r
ChangeThreadsState(THREAD_RUN);\r
return ret;\r
return 222;
}
+ static int TestTimeOut()
+ {
+ System.Threading.Thread.Sleep(10000);
+ return 5;
+ }
+
static void Main(string[] args)
{
Label.Checkpoint("init", "values_test", (Object context) => {
Context.GetAndCheckValue(@"__FILE__:__LINE__", "111", "int", "stGetInt()");
Context.GetAndCheckValue(@"__FILE__:__LINE__", "666", "int", "stGetInt(333)");
Context.CheckErrorAtRequest(@"__FILE__:__LINE__", "getInt()", "Error:");
+ Context.CheckErrorAtRequest(@"__FILE__:__LINE__", "TestTimeOut()", "Error: 0x80131505");
+
Context.Continue(@"__FILE__:__LINE__");
});
return 222;
}
+ static int TestTimeOut()
+ {
+ System.Threading.Thread.Sleep(10000);
+ return 5;
+ }
+
static void Main(string[] args)
{
Label.Checkpoint("init", "values_test", (Object context) => {
Context.GetAndCheckValue(@"__FILE__:__LINE__", frameId, "111", "int", "stGetInt()");
Context.GetAndCheckValue(@"__FILE__:__LINE__", frameId, "222", "int", "stGetInt(111)");
Context.CheckErrorAtRequest(@"__FILE__:__LINE__", frameId, "getInt()", "error");
+ Context.CheckErrorAtRequest(@"__FILE__:__LINE__", frameId, "TestTimeOut()", "error: 0x80131505");
Context.Continue(@"__FILE__:__LINE__");
});