Browse Source

Fixed SD2-1086: Debugger thrown exception trying to show tooltip of decimal variable.

- Eval does not work on thread unsafe point after break

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1810 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
5643b88dd1
  1. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs
  2. 3
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs

@ -63,6 +63,12 @@ namespace Debugger
} }
} }
public bool IsAtSafePoint {
get {
return corThread.UserState != CorDebugUserState.USER_UNSAFE_POINT;
}
}
public ICorDebugThread CorThread { public ICorDebugThread CorThread {
get { get {
return corThread; return corThread;

3
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs

@ -153,6 +153,9 @@ namespace Debugger
if (targetThread.IsLastFunctionNative) { if (targetThread.IsLastFunctionNative) {
throw new EvalSetupException("Can not evaluate because native frame is on top of stack"); throw new EvalSetupException("Can not evaluate because native frame is on top of stack");
} }
if (!targetThread.IsAtSafePoint) {
throw new EvalSetupException("Can not evaluate because thread is not at a safe point");
}
// TODO: What if this thread is not suitable? // TODO: What if this thread is not suitable?
corEval = targetThread.CorThread.CreateEval(); corEval = targetThread.CorThread.CreateEval();

Loading…
Cancel
Save