Browse Source

fixed conditional breakpoints and ==-operator evaluation.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3551 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Siegfried Pammer 18 years ago
parent
commit
61c64ac3e7
  1. 24
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Expressions/EvaluateAstVisitor.cs
  2. 3
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

24
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Expressions/EvaluateAstVisitor.cs

@ -154,14 +154,15 @@ namespace Debugger.AddIn @@ -154,14 +154,15 @@ namespace Debugger.AddIn
Value val = Eval.NewObjectNoConstructor(DebugType.Create(context.Process, null, typeof(bool).FullName));
switch (binaryOperatorExpression.Op)
{
case BinaryOperatorType.Equality :
val.PrimitiveValue = (right.PrimitiveValue == left.PrimitiveValue);
break;
case BinaryOperatorType.InEquality :
val.PrimitiveValue = (right.PrimitiveValue != left.PrimitiveValue);
break;
try {
switch (binaryOperatorExpression.Op)
{
case BinaryOperatorType.Equality :
val.PrimitiveValue = object.Equals(right.PrimitiveValue, left.PrimitiveValue);
break;
case BinaryOperatorType.InEquality :
val.PrimitiveValue = !object.Equals(right.PrimitiveValue, left.PrimitiveValue);
break;
// case BinaryOperatorType.Add :
// val.PrimitiveValue = (right.PrimitiveValue.ToString() + left.PrimitiveValue.ToString());
// break;
@ -174,8 +175,11 @@ namespace Debugger.AddIn @@ -174,8 +175,11 @@ namespace Debugger.AddIn
// case BinaryOperatorType.GreaterThanOrEqual :
// val.PrimitiveValue = (right.PrimitiveValue >= left.PrimitiveValue);
// break;
default :
throw new NotImplementedException("BinaryOperator: " + binaryOperatorExpression.Op + "!");
default :
throw new NotImplementedException("BinaryOperator: " + binaryOperatorExpression.Op + "!");
}
} catch (System.Exception e) {
throw new GetValueException(e.Message);
}
return val;

3
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -594,7 +594,8 @@ namespace ICSharpCode.SharpDevelop.Services @@ -594,7 +594,8 @@ namespace ICSharpCode.SharpDevelop.Services
else
return false;
} catch (GetValueException e) {
throw e;
WorkbenchSingleton.SafeThreadAsyncCall(MessageService.ShowError, e);
return true;
}
}

Loading…
Cancel
Save