From 06766bc96de389194d630e15edc532ccbaf2cd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Wed, 18 Jun 2008 00:33:24 +0000 Subject: [PATCH] Fixed SD2-1387: Freezing a thread may hang SharpDevelop git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3107 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs index a5328afb37..6a6520451b 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs @@ -97,6 +97,9 @@ namespace Debugger if (!targetThread.IsAtSafePoint) { throw new GetValueException("Can not evaluate because thread is not at a safe point"); } + if (targetThread.Suspended) { + throw new GetValueException("Can not evaluate on suspended thread"); + } return targetThread.CorThread.CreateEval(); } @@ -135,6 +138,7 @@ namespace Debugger Value WaitForResult() { + // Note that aborting is not supported for suspended threads try { process.WaitForPause(TimeSpan.FromMilliseconds(500)); if (!Evaluated) {