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

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

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

Loading…
Cancel
Save