Browse Source

The console is able to box values;

Added Value.IsReference property

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3237 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
9218a36d0b
  1. 3
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Expressions/EvaluateAstVisitor.cs
  2. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/ConsolePad.cs
  3. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Array.cs
  4. 5
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
  5. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs
  6. 62
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs
  7. 7
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
  8. 34
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs
  9. 12
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
  10. 14
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
  11. 5
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
  12. 20
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
  13. 18
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
  14. 4
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs
  15. 1
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs

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

@ -28,6 +28,9 @@ namespace Debugger.AddIn @@ -28,6 +28,9 @@ namespace Debugger.AddIn
// Calculate right first so that left does not get invalidated by its calculation
Value right = ((Value)assignmentExpression.Right.AcceptVisitor(this, null)).GetPermanentReference();
Value left = (Value)assignmentExpression.Left.AcceptVisitor(this, null);
if (!left.IsReference && left.Type.FullName != right.Type.FullName) {
throw new GetValueException(string.Format("Type {0} expected, {1} seen", left.Type.FullName, right.Type.FullName));
}
left.SetValue(right);
return right;
}

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/ConsolePad.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -80,7 +80,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
try {
Value val = AstEvaluator.Evaluate(code, SupportedLanguage.CSharp, process.SelectedStackFrame);
if (val != null) {
return string.Format("{0} ({1})", val.AsString, val.Type.FullName);
return val.InvokeToString();
} else {
return string.Empty;
}

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Array.cs

@ -24,7 +24,7 @@ namespace Debugger @@ -24,7 +24,7 @@ namespace Debugger
if (IsNull) throw new GetValueException("Value is null");
if (!this.Type.IsArray) throw new DebuggerException("Value is not an array");
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugArrayValue>();
return this.CorReferenceValue.Dereference().CastTo<ICorDebugArrayValue>();
}
}

5
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs

@ -22,12 +22,12 @@ namespace Debugger @@ -22,12 +22,12 @@ namespace Debugger
if (IsNull) throw new GetValueException("Value is null");
if (this.Type.IsClass) {
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugObjectValue>();
return this.CorReferenceValue.Dereference().CastTo<ICorDebugObjectValue>();
}
if (this.Type.IsValueType) {
if (this.CorValue.Is<ICorDebugReferenceValue>()) {
// Dereference and unbox
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugBoxValue>().Object;
return this.CorReferenceValue.Dereference().CastTo<ICorDebugBoxValue>().Object;
} else {
return this.CorValue.CastTo<ICorDebugObjectValue>();
}
@ -240,6 +240,7 @@ namespace Debugger @@ -240,6 +240,7 @@ namespace Debugger
public string InvokeToString()
{
if (this.Type.IsPrimitive) return AsString;
if (this.Type.IsPointer) return "0x" + this.PointerAddress.ToString("X");
// if (!IsObject) // Can invoke on primitives
return Eval.InvokeMethod(Process, this.Type.AppDomainID, typeof(object), "ToString", this, new Value[] {}).AsString;
}

4
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs

@ -21,7 +21,7 @@ namespace Debugger @@ -21,7 +21,7 @@ namespace Debugger
// Dereference and unbox
if (this.CorValue.Is<ICorDebugReferenceValue>()) {
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugBoxValue>().Object.CastTo<ICorDebugGenericValue>();
return this.CorReferenceValue.Dereference().CastTo<ICorDebugBoxValue>().Object.CastTo<ICorDebugGenericValue>();
} else {
return this.CorValue.CastTo<ICorDebugGenericValue>();
}
@ -38,7 +38,7 @@ namespace Debugger @@ -38,7 +38,7 @@ namespace Debugger
if (!this.Type.IsPrimitive) throw new DebuggerException("Value is not a primitive type");
if (this.Type.IsString) {
if (this.IsNull) return null;
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugStringValue>().String;
return this.CorReferenceValue.Dereference().CastTo<ICorDebugStringValue>().String;
} else {
return CorGenericValue.Value;
}

62
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs

@ -83,6 +83,42 @@ namespace Debugger @@ -83,6 +83,42 @@ namespace Debugger
}
}
ICorDebugReferenceValue CorReferenceValue {
get {
if (!this.IsReference) throw new DebuggerException("Reference value expected");
return this.CorValue.CastTo<ICorDebugReferenceValue>();
}
}
/// <summary> Gets value indication whether the value is a reference </summary>
/// <remarks> Value types also return true if they are boxed </remarks>
public bool IsReference {
get {
return this.CorValue.Is<ICorDebugReferenceValue>();
}
}
Value Box()
{
byte[] rawValue = this.CorGenericValue.RawValue;
// Box the value type
ICorDebugValue corValue;
if (this.Type.IsPrimitive) {
// Get value type for the primive type
corValue = Eval.NewObjectNoConstructor(DebugType.Create(process, null, this.Type.FullName)).CorValue;
} else {
corValue = Eval.NewObjectNoConstructor(this.Type).CorValue;
}
// Make the reference to box permanent
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
// Create new value
Value newValue = new Value(process, expression, corValue);
// Copy the data inside the box
newValue.CorGenericValue.RawValue = rawValue;
return newValue;
}
public Value GetPermanentReference()
{
ICorDebugValue corValue = this.CorValue;
@ -91,20 +127,7 @@ namespace Debugger @@ -91,20 +127,7 @@ namespace Debugger
}
if (this.Type.IsValueType || this.Type.IsPrimitive) {
if (!corValue.Is<ICorDebugReferenceValue>()) {
// Box the value type
if (this.Type.IsPrimitive) {
// Get value type for the primive type
corValue = Eval.NewObjectNoConstructor(DebugType.Create(process, null, this.Type.FullName)).CorValue;
} else {
corValue = Eval.NewObjectNoConstructor(this.Type).CorValue;
}
// Make the reference to box permanent
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
// Create new value
Value newValue = new Value(process, expression, corValue);
// Copy the data inside the box
newValue.CorGenericValue.RawValue = this.CorGenericValue.RawValue;
return newValue;
return this.Box();
} else {
// Make the reference to box permanent
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
@ -167,18 +190,15 @@ namespace Debugger @@ -167,18 +190,15 @@ namespace Debugger
/// <summary> Copy the acutal value from some other Value object </summary>
public void SetValue(Value newValue)
{
ICorDebugValue corValue = this.CorValue;
ICorDebugValue newCorValue = newValue.CorValue;
if (corValue.Is<ICorDebugReferenceValue>()) {
if (newCorValue.Is<ICorDebugObjectValue>()) {
ICorDebugValue box = Eval.NewObjectNoConstructor(newValue.Type).CorValue;
newCorValue = box;
if (this.IsReference) {
if (!newCorValue.Is<ICorDebugReferenceValue>()) {
newCorValue = newValue.Box().CorValue;
}
corValue.CastTo<ICorDebugReferenceValue>().SetValue(newCorValue.CastTo<ICorDebugReferenceValue>().Value);
} else {
corValue.CastTo<ICorDebugGenericValue>().RawValue =
newCorValue.CastTo<ICorDebugGenericValue>().RawValue;
corValue.CastTo<ICorDebugGenericValue>().RawValue = newValue.CorGenericValue.RawValue;
}
}

7
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs

@ -64,6 +64,7 @@ namespace Debugger.Tests { @@ -64,6 +64,7 @@ namespace Debugger.Tests {
Expression="array"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32[]" />
</array>
@ -77,6 +78,7 @@ namespace Debugger.Tests { @@ -77,6 +78,7 @@ namespace Debugger.Tests {
Expression="array[0]"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -89,6 +91,7 @@ namespace Debugger.Tests { @@ -89,6 +91,7 @@ namespace Debugger.Tests {
Expression="array[1]"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -101,6 +104,7 @@ namespace Debugger.Tests { @@ -101,6 +104,7 @@ namespace Debugger.Tests {
Expression="array[2]"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
@ -113,6 +117,7 @@ namespace Debugger.Tests { @@ -113,6 +117,7 @@ namespace Debugger.Tests {
Expression="array[3]"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
@ -125,6 +130,7 @@ namespace Debugger.Tests { @@ -125,6 +130,7 @@ namespace Debugger.Tests {
Expression="array[4]"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="4"
Type="System.Int32" />
</Item>
@ -172,6 +178,7 @@ namespace Debugger.Tests { @@ -172,6 +178,7 @@ namespace Debugger.Tests {
Expression="array.Length"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="5"
Type="System.Int32" />
</array.Length>

34
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs

@ -118,6 +118,7 @@ namespace Debugger.Tests { @@ -118,6 +118,7 @@ namespace Debugger.Tests {
Expression="nullMyClass"
IsInvalid="False"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="MyClass">
<Type>
@ -143,6 +144,7 @@ namespace Debugger.Tests { @@ -143,6 +144,7 @@ namespace Debugger.Tests {
Expression="nullObject"
IsInvalid="False"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
@ -168,6 +170,7 @@ namespace Debugger.Tests { @@ -168,6 +170,7 @@ namespace Debugger.Tests {
Expression="nullString"
IsInvalid="False"
IsNull="True"
IsReference="True"
PrimitiveValue="null"
Type="System.String">
<Type>
@ -193,6 +196,7 @@ namespace Debugger.Tests { @@ -193,6 +196,7 @@ namespace Debugger.Tests {
Expression="obj"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
@ -218,6 +222,7 @@ namespace Debugger.Tests { @@ -218,6 +222,7 @@ namespace Debugger.Tests {
Expression="loc"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="42"
Type="System.Int32">
<Type>
@ -243,6 +248,7 @@ namespace Debugger.Tests { @@ -243,6 +248,7 @@ namespace Debugger.Tests {
Expression="locByRef"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="43"
Type="System.Int32">
<Type>
@ -268,6 +274,7 @@ namespace Debugger.Tests { @@ -268,6 +274,7 @@ namespace Debugger.Tests {
Expression="locPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
@ -304,6 +311,7 @@ namespace Debugger.Tests { @@ -304,6 +311,7 @@ namespace Debugger.Tests {
Expression="locPtrByRef"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
@ -340,6 +348,7 @@ namespace Debugger.Tests { @@ -340,6 +348,7 @@ namespace Debugger.Tests {
Expression="locPtrPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32**">
<Type>
@ -387,6 +396,7 @@ namespace Debugger.Tests { @@ -387,6 +396,7 @@ namespace Debugger.Tests {
Expression="locVoidPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Void*">
<Type>
@ -423,6 +433,7 @@ namespace Debugger.Tests { @@ -423,6 +433,7 @@ namespace Debugger.Tests {
Expression="locObj"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
@ -448,6 +459,7 @@ namespace Debugger.Tests { @@ -448,6 +459,7 @@ namespace Debugger.Tests {
Expression="locObjByRef"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
@ -473,6 +485,7 @@ namespace Debugger.Tests { @@ -473,6 +485,7 @@ namespace Debugger.Tests {
Expression="locSZArray"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Char[]">
<Type>
@ -509,6 +522,7 @@ namespace Debugger.Tests { @@ -509,6 +522,7 @@ namespace Debugger.Tests {
Expression="locArray"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Char[,]">
<Type>
@ -545,6 +559,7 @@ namespace Debugger.Tests { @@ -545,6 +559,7 @@ namespace Debugger.Tests {
Expression="locStruct"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point">
<Type>
@ -570,6 +585,7 @@ namespace Debugger.Tests { @@ -570,6 +585,7 @@ namespace Debugger.Tests {
Expression="locStructPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point*">
<Type>
@ -606,6 +622,7 @@ namespace Debugger.Tests { @@ -606,6 +622,7 @@ namespace Debugger.Tests {
Expression="box"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32">
<Type>
@ -631,6 +648,7 @@ namespace Debugger.Tests { @@ -631,6 +648,7 @@ namespace Debugger.Tests {
Expression="myInterfaceImpl"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="MyInterfaceImpl">
<Type>
@ -656,6 +674,7 @@ namespace Debugger.Tests { @@ -656,6 +674,7 @@ namespace Debugger.Tests {
Expression="myInterface"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="MyInterfaceImpl">
<Type>
@ -686,6 +705,7 @@ namespace Debugger.Tests { @@ -686,6 +705,7 @@ namespace Debugger.Tests {
Expression="arg"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="42"
Type="System.Int32">
<Type>
@ -711,6 +731,7 @@ namespace Debugger.Tests { @@ -711,6 +731,7 @@ namespace Debugger.Tests {
Expression="argByRef"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="43"
Type="System.Int32">
<Type>
@ -736,6 +757,7 @@ namespace Debugger.Tests { @@ -736,6 +757,7 @@ namespace Debugger.Tests {
Expression="argPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
@ -772,6 +794,7 @@ namespace Debugger.Tests { @@ -772,6 +794,7 @@ namespace Debugger.Tests {
Expression="argPtrByRef"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32*">
<Type>
@ -808,6 +831,7 @@ namespace Debugger.Tests { @@ -808,6 +831,7 @@ namespace Debugger.Tests {
Expression="argPtrPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32**">
<Type>
@ -855,6 +879,7 @@ namespace Debugger.Tests { @@ -855,6 +879,7 @@ namespace Debugger.Tests {
Expression="argVoidPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Void*">
<Type>
@ -891,6 +916,7 @@ namespace Debugger.Tests { @@ -891,6 +916,7 @@ namespace Debugger.Tests {
Expression="argObj"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
@ -916,6 +942,7 @@ namespace Debugger.Tests { @@ -916,6 +942,7 @@ namespace Debugger.Tests {
Expression="argObjByRef"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object">
<Type>
@ -941,6 +968,7 @@ namespace Debugger.Tests { @@ -941,6 +968,7 @@ namespace Debugger.Tests {
Expression="argSZArray"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Char[]">
<Type>
@ -977,6 +1005,7 @@ namespace Debugger.Tests { @@ -977,6 +1005,7 @@ namespace Debugger.Tests {
Expression="argArray"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Char[,]">
<Type>
@ -1013,6 +1042,7 @@ namespace Debugger.Tests { @@ -1013,6 +1042,7 @@ namespace Debugger.Tests {
Expression="argStruct"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point">
<Type>
@ -1038,6 +1068,7 @@ namespace Debugger.Tests { @@ -1038,6 +1068,7 @@ namespace Debugger.Tests {
Expression="argStructByRef"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point">
<Type>
@ -1063,6 +1094,7 @@ namespace Debugger.Tests { @@ -1063,6 +1094,7 @@ namespace Debugger.Tests {
Expression="argStructPtr"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Point*">
<Type>
@ -1099,6 +1131,7 @@ namespace Debugger.Tests { @@ -1099,6 +1131,7 @@ namespace Debugger.Tests {
Expression="argBox"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32">
<Type>
@ -1124,6 +1157,7 @@ namespace Debugger.Tests { @@ -1124,6 +1157,7 @@ namespace Debugger.Tests {
Expression="argBoxByRef"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32">
<Type>

12
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs

@ -89,6 +89,7 @@ namespace Debugger.Tests { @@ -89,6 +89,7 @@ namespace Debugger.Tests {
Expression="arg"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="argValue"
Type="System.String" />
</Item>
@ -105,6 +106,7 @@ namespace Debugger.Tests { @@ -105,6 +106,7 @@ namespace Debugger.Tests {
Expression="i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -117,6 +119,7 @@ namespace Debugger.Tests { @@ -117,6 +119,7 @@ namespace Debugger.Tests {
Expression="array"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -129,6 +132,7 @@ namespace Debugger.Tests { @@ -129,6 +132,7 @@ namespace Debugger.Tests {
Expression="array2"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[,]" />
</Item>
@ -143,6 +147,7 @@ namespace Debugger.Tests { @@ -143,6 +147,7 @@ namespace Debugger.Tests {
Expression="this.name"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="derived name"
Type="System.String" />
</Item>
@ -155,6 +160,7 @@ namespace Debugger.Tests { @@ -155,6 +160,7 @@ namespace Debugger.Tests {
Expression="this.Value"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="derived value"
Type="System.String" />
</Item>
@ -167,6 +173,7 @@ namespace Debugger.Tests { @@ -167,6 +173,7 @@ namespace Debugger.Tests {
Expression="this.field"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="field value"
Type="System.String" />
</Item>
@ -179,6 +186,7 @@ namespace Debugger.Tests { @@ -179,6 +186,7 @@ namespace Debugger.Tests {
Expression="this.array"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -191,6 +199,7 @@ namespace Debugger.Tests { @@ -191,6 +199,7 @@ namespace Debugger.Tests {
Expression="this.Name"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="derived name"
Type="System.String" />
</Item>
@ -203,6 +212,7 @@ namespace Debugger.Tests { @@ -203,6 +212,7 @@ namespace Debugger.Tests {
Expression="this.name"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="base name"
Type="System.String" />
</Item>
@ -215,6 +225,7 @@ namespace Debugger.Tests { @@ -215,6 +225,7 @@ namespace Debugger.Tests {
Expression="this.Value"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="base value"
Type="System.String" />
</Item>
@ -227,6 +238,7 @@ namespace Debugger.Tests { @@ -227,6 +238,7 @@ namespace Debugger.Tests {
Expression="this.Name"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="base name"
Type="System.String" />
</Item>

14
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs

@ -106,6 +106,7 @@ namespace Debugger.Tests { @@ -106,6 +106,7 @@ namespace Debugger.Tests {
Expression="i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -118,6 +119,7 @@ namespace Debugger.Tests { @@ -118,6 +119,7 @@ namespace Debugger.Tests {
Expression="s"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="A"
Type="System.String" />
</Item>
@ -130,6 +132,7 @@ namespace Debugger.Tests { @@ -130,6 +132,7 @@ namespace Debugger.Tests {
Expression="s_null"
IsInvalid="False"
IsNull="True"
IsReference="True"
PrimitiveValue="null"
Type="System.String" />
</Item>
@ -142,6 +145,7 @@ namespace Debugger.Tests { @@ -142,6 +145,7 @@ namespace Debugger.Tests {
Expression="ref_i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
@ -154,6 +158,7 @@ namespace Debugger.Tests { @@ -154,6 +158,7 @@ namespace Debugger.Tests {
Expression="out_i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
@ -166,6 +171,7 @@ namespace Debugger.Tests { @@ -166,6 +171,7 @@ namespace Debugger.Tests {
Expression="out_i2"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -178,6 +184,7 @@ namespace Debugger.Tests { @@ -178,6 +184,7 @@ namespace Debugger.Tests {
Expression="ref_s"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="B"
Type="System.String" />
</Item>
@ -190,6 +197,7 @@ namespace Debugger.Tests { @@ -190,6 +197,7 @@ namespace Debugger.Tests {
Expression="iNull"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Nullable&lt;System.Int32&gt;" />
</Item>
@ -202,6 +210,7 @@ namespace Debugger.Tests { @@ -202,6 +210,7 @@ namespace Debugger.Tests {
Expression="iNull_null"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Nullable&lt;System.Int32&gt;" />
</Item>
@ -219,6 +228,7 @@ namespace Debugger.Tests { @@ -219,6 +228,7 @@ namespace Debugger.Tests {
Expression="args"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -236,6 +246,7 @@ namespace Debugger.Tests { @@ -236,6 +246,7 @@ namespace Debugger.Tests {
Expression="args"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -253,6 +264,7 @@ namespace Debugger.Tests { @@ -253,6 +264,7 @@ namespace Debugger.Tests {
Expression="args"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -270,6 +282,7 @@ namespace Debugger.Tests { @@ -270,6 +282,7 @@ namespace Debugger.Tests {
Expression="i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -282,6 +295,7 @@ namespace Debugger.Tests { @@ -282,6 +295,7 @@ namespace Debugger.Tests {
Expression="s"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="A"
Type="System.String" />
</Item>

5
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs

@ -61,6 +61,7 @@ namespace Debugger.Tests { @@ -61,6 +61,7 @@ namespace Debugger.Tests {
Expression="i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -73,6 +74,7 @@ namespace Debugger.Tests { @@ -73,6 +74,7 @@ namespace Debugger.Tests {
Expression="s"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="S"
Type="System.String" />
</Item>
@ -85,6 +87,7 @@ namespace Debugger.Tests { @@ -85,6 +87,7 @@ namespace Debugger.Tests {
Expression="args"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -97,6 +100,7 @@ namespace Debugger.Tests { @@ -97,6 +100,7 @@ namespace Debugger.Tests {
Expression="n"
IsInvalid="False"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
</Item>
@ -109,6 +113,7 @@ namespace Debugger.Tests { @@ -109,6 +113,7 @@ namespace Debugger.Tests {
Expression="o"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
</Item>

20
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs

@ -108,6 +108,7 @@ namespace Debugger.Tests { @@ -108,6 +108,7 @@ namespace Debugger.Tests {
Expression="argument"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="1"
Type="System.Int32" />
</argument>
@ -120,6 +121,7 @@ namespace Debugger.Tests { @@ -120,6 +121,7 @@ namespace Debugger.Tests {
Expression="local"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="2"
Type="System.Int32" />
</local>
@ -132,6 +134,7 @@ namespace Debugger.Tests { @@ -132,6 +134,7 @@ namespace Debugger.Tests {
Expression="this.class"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="3"
Type="System.Int32" />
</_x0040_class>
@ -145,6 +148,7 @@ namespace Debugger.Tests { @@ -145,6 +148,7 @@ namespace Debugger.Tests {
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -157,6 +161,7 @@ namespace Debugger.Tests { @@ -157,6 +161,7 @@ namespace Debugger.Tests {
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -169,6 +174,7 @@ namespace Debugger.Tests { @@ -169,6 +174,7 @@ namespace Debugger.Tests {
Expression="this.class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -181,6 +187,7 @@ namespace Debugger.Tests { @@ -181,6 +187,7 @@ namespace Debugger.Tests {
Expression="localInSubFunction"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="4"
Type="System.Int32" />
</localInSubFunction>
@ -194,6 +201,7 @@ namespace Debugger.Tests { @@ -194,6 +201,7 @@ namespace Debugger.Tests {
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -206,6 +214,7 @@ namespace Debugger.Tests { @@ -206,6 +214,7 @@ namespace Debugger.Tests {
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -218,6 +227,7 @@ namespace Debugger.Tests { @@ -218,6 +227,7 @@ namespace Debugger.Tests {
Expression="this.class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -230,6 +240,7 @@ namespace Debugger.Tests { @@ -230,6 +240,7 @@ namespace Debugger.Tests {
Expression="localInSubFunction"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</localInSubFunction>
@ -243,6 +254,7 @@ namespace Debugger.Tests { @@ -243,6 +254,7 @@ namespace Debugger.Tests {
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -255,6 +267,7 @@ namespace Debugger.Tests { @@ -255,6 +267,7 @@ namespace Debugger.Tests {
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -267,6 +280,7 @@ namespace Debugger.Tests { @@ -267,6 +280,7 @@ namespace Debugger.Tests {
Expression="this.class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -279,6 +293,7 @@ namespace Debugger.Tests { @@ -279,6 +293,7 @@ namespace Debugger.Tests {
Expression="localInSubFunction"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</localInSubFunction>
@ -291,6 +306,7 @@ namespace Debugger.Tests { @@ -291,6 +306,7 @@ namespace Debugger.Tests {
Expression="localInSubFunction"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="4"
Type="System.Int32" />
</localInSubFunction_x0028_new_x0029_>
@ -304,6 +320,7 @@ namespace Debugger.Tests { @@ -304,6 +320,7 @@ namespace Debugger.Tests {
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -316,6 +333,7 @@ namespace Debugger.Tests { @@ -316,6 +333,7 @@ namespace Debugger.Tests {
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -328,6 +346,7 @@ namespace Debugger.Tests { @@ -328,6 +346,7 @@ namespace Debugger.Tests {
Expression="this.class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -340,6 +359,7 @@ namespace Debugger.Tests { @@ -340,6 +359,7 @@ namespace Debugger.Tests {
Expression="localInSubFunction"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</localInSubFunction>

18
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs

@ -180,6 +180,7 @@ namespace Debugger.Tests { @@ -180,6 +180,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -192,6 +193,7 @@ namespace Debugger.Tests { @@ -192,6 +193,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="1!"
Type="System.String" />
</Item>
@ -245,6 +247,7 @@ namespace Debugger.Tests { @@ -245,6 +247,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
@ -257,6 +260,7 @@ namespace Debugger.Tests { @@ -257,6 +260,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="2!"
Type="System.String" />
</Item>
@ -310,6 +314,7 @@ namespace Debugger.Tests { @@ -310,6 +314,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
@ -322,6 +327,7 @@ namespace Debugger.Tests { @@ -322,6 +327,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="3!"
Type="System.String" />
</Item>
@ -375,6 +381,7 @@ namespace Debugger.Tests { @@ -375,6 +381,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="4"
Type="System.Int32" />
</Item>
@ -387,6 +394,7 @@ namespace Debugger.Tests { @@ -387,6 +394,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="4!"
Type="System.String" />
</Item>
@ -440,6 +448,7 @@ namespace Debugger.Tests { @@ -440,6 +448,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="5"
Type="System.Int32" />
</Item>
@ -452,6 +461,7 @@ namespace Debugger.Tests { @@ -452,6 +461,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="5!"
Type="System.String" />
</Item>
@ -505,6 +515,7 @@ namespace Debugger.Tests { @@ -505,6 +515,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="6"
Type="System.Int32" />
</Item>
@ -517,6 +528,7 @@ namespace Debugger.Tests { @@ -517,6 +528,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="6!"
Type="System.String" />
</Item>
@ -570,6 +582,7 @@ namespace Debugger.Tests { @@ -570,6 +582,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="7"
Type="System.Int32" />
</Item>
@ -582,6 +595,7 @@ namespace Debugger.Tests { @@ -582,6 +595,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="7!"
Type="System.String" />
</Item>
@ -635,6 +649,7 @@ namespace Debugger.Tests { @@ -635,6 +649,7 @@ namespace Debugger.Tests {
Expression="v"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="8"
Type="System.Int32" />
</Item>
@ -647,6 +662,7 @@ namespace Debugger.Tests { @@ -647,6 +662,7 @@ namespace Debugger.Tests {
Expression="k"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="8!"
Type="System.String" />
</Item>
@ -661,6 +677,7 @@ namespace Debugger.Tests { @@ -661,6 +677,7 @@ namespace Debugger.Tests {
Expression="gClass.Prop"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="0"
Type="System.Int32" />
</Prop>
@ -673,6 +690,7 @@ namespace Debugger.Tests { @@ -673,6 +690,7 @@ namespace Debugger.Tests {
Expression="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;.StaticProp"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="0"
Type="System.Int32" />
</StaticProp>

4
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs

@ -68,6 +68,7 @@ namespace Debugger.Tests { @@ -68,6 +68,7 @@ namespace Debugger.Tests {
Expression="b"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="True"
Type="System.Boolean">
<Type>
@ -104,6 +105,7 @@ namespace Debugger.Tests { @@ -104,6 +105,7 @@ namespace Debugger.Tests {
Expression="i"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="5"
Type="System.Int32">
<Type>
@ -140,6 +142,7 @@ namespace Debugger.Tests { @@ -140,6 +142,7 @@ namespace Debugger.Tests {
Expression="s"
IsInvalid="False"
IsNull="False"
IsReference="True"
PrimitiveValue="five"
Type="System.String">
<Type>
@ -176,6 +179,7 @@ namespace Debugger.Tests { @@ -176,6 +179,7 @@ namespace Debugger.Tests {
Expression="d"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="5.5"
Type="System.Double">
<Type>

1
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs

@ -62,6 +62,7 @@ namespace Debugger.Tests { @@ -62,6 +62,7 @@ namespace Debugger.Tests {
Expression="this"
IsInvalid="False"
IsNull="False"
IsReference="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Debugger.Tests.ValueType">
<Type>

Loading…
Cancel
Save