Browse Source

Changing the API for Value and DebugType - removed a few Is* properties.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3196 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
074deab11a
  1. 4
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Expressions/EvaluateAstVisitor.cs
  2. 10
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs
  3. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  4. 10
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs
  5. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs
  6. 1
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType-Helpers.cs
  7. 134
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs
  8. 18
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Array.cs
  9. 45
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Helpers.cs
  10. 26
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
  11. 45
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs
  12. 46
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs
  13. 52
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
  14. 821
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugTypes.cs
  15. 16
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DefinedTypes.cs
  16. 64
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
  17. 26
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
  18. 80
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
  19. 136
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
  20. 80
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/PrimitiveValue.cs
  21. 28
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs

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

@ -79,11 +79,11 @@ namespace Debugger.AddIn @@ -79,11 +79,11 @@ namespace Debugger.AddIn
List<int> indexes = new List<int>();
foreach(Expression indexExpr in indexerExpression.Indexes) {
Value indexValue = (Value)indexExpr.AcceptVisitor(this, null);
if (!indexValue.IsInteger) throw new GetValueException("Integer expected");
if (!indexValue.Type.IsInteger) throw new GetValueException("Integer expected");
indexes.Add((int)indexValue.PrimitiveValue);
}
Value target = (Value)indexerExpression.TargetObject.AcceptVisitor(this, null);
if (!target.IsArray) throw new GetValueException("Target is not array");
if (!target.Type.IsArray) throw new GetValueException("Target is not array");
return target.GetArrayElement(indexes.ToArray());
}

10
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs

@ -61,7 +61,7 @@ namespace Debugger.AddIn.TreeModel @@ -61,7 +61,7 @@ namespace Debugger.AddIn.TreeModel
this.expression = val.Expression;
canSetText = false;
if (val.IsInteger) {
if (val.Type.IsInteger) {
canSetText =
(val.Expression is LocalVariableIdentifierExpression) ||
(val.Expression is ParameterIdentifierExpression) ||
@ -73,7 +73,7 @@ namespace Debugger.AddIn.TreeModel @@ -73,7 +73,7 @@ namespace Debugger.AddIn.TreeModel
this.Name = val.Expression.CodeTail;
if (DebuggingOptions.ShowValuesInHexadecimal && val.IsInteger) {
if (DebuggingOptions.ShowValuesInHexadecimal && val.Type.IsInteger) {
this.Text = String.Format("0x{0:X}", val.PrimitiveValue);
} else {
this.Text = val.AsString;
@ -86,9 +86,9 @@ namespace Debugger.AddIn.TreeModel @@ -86,9 +86,9 @@ namespace Debugger.AddIn.TreeModel
}
// Note that these return enumerators so they are lazy-evaluated
if (val.IsObject) {
if (val.Type.IsClass || val.Type.IsValueType) {
this.ChildNodes = Utils.GetChildNodesOfObject(this.Expression, val.Type);
} else if (val.IsArray) {
} else if (val.Type.IsArray) {
this.ChildNodes = Utils.GetChildNodesOfArray(this.Expression, val.ArrayDimensions);
} else {
this.ChildNodes = null;
@ -100,7 +100,7 @@ namespace Debugger.AddIn.TreeModel @@ -100,7 +100,7 @@ namespace Debugger.AddIn.TreeModel
}
// Do last since it may expire the object
if (val.IsObject) {
if (val.Type.IsClass || val.Type.IsValueType) {
this.Text = val.InvokeToString();
}
}

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -225,7 +225,6 @@ @@ -225,7 +225,6 @@
<Compile Include="Src\Values\ArrayDimensions.cs" />
<Compile Include="Src\Values\Value.Array.cs" />
<Compile Include="Src\Values\Value.cs" />
<Compile Include="Src\Values\Value.Helpers.cs" />
<Compile Include="Src\Values\Value.Object.cs" />
<Compile Include="Src\Values\Value.Primitive.cs" />
<Compile Include="Src\Wrappers\CorDebug\Autogenerated\CorDebug.cs" />

10
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs

@ -5,10 +5,10 @@ @@ -5,10 +5,10 @@
// <version>$Revision$</version>
// </file>
using Debugger.Expressions;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Debugger.MetaData;
using Debugger.Wrappers.CorDebug;
@ -176,7 +176,7 @@ namespace Debugger @@ -176,7 +176,7 @@ namespace Debugger
} else {
state = EvalState.EvaluatedException;
}
result = new Value(process, corEval.Result);
result = new Value(process, new EmptyExpression(), corEval.Result);
}
}
@ -232,7 +232,7 @@ namespace Debugger @@ -232,7 +232,7 @@ namespace Debugger
corArgs.Add(arg.CorValue);
}
ICorDebugType[] genericArgs = method.DeclaringType.GetGenericArgumentsAsCorDebugType();
ICorDebugType[] genericArgs = method.DeclaringType.GenericArgumentsAsCorDebugType;
eval.CorEval.CastTo<ICorDebugEval2>().CallParameterizedFunction(
method.CorFunction,
(uint)genericArgs.Length, genericArgs,
@ -266,7 +266,7 @@ namespace Debugger @@ -266,7 +266,7 @@ namespace Debugger
{
ICorDebugEval corEval = CreateCorEval(debugType.Process);
ICorDebugValue corValue = corEval.CastTo<ICorDebugEval2>().CreateValueForType(debugType.CorType);
return new Value(debugType.Process, corValue);
return new Value(debugType.Process, new EmptyExpression(), corValue);
}
#region Convenience methods
@ -304,7 +304,7 @@ namespace Debugger @@ -304,7 +304,7 @@ namespace Debugger
debugType.Process,
"New object: " + debugType.FullName,
delegate(Eval eval) {
eval.CorEval.CastTo<ICorDebugEval2>().NewParameterizedObjectNoConstructor(debugType.CorType.Class, (uint)debugType.GetGenericArguments().Length, debugType.GetGenericArgumentsAsCorDebugType());
eval.CorEval.CastTo<ICorDebugEval2>().NewParameterizedObjectNoConstructor(debugType.CorType.Class, (uint)debugType.GenericArguments.Count, debugType.GenericArgumentsAsCorDebugType);
}
);
}

4
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs

@ -5,12 +5,12 @@ @@ -5,12 +5,12 @@
// <version>$Revision$</version>
// </file>
using Debugger.Expressions;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using Debugger.Wrappers.CorDebug;
namespace Debugger
@ -147,7 +147,7 @@ namespace Debugger @@ -147,7 +147,7 @@ namespace Debugger
get {
process.AssertPaused();
return new Value(process, CorThread.Object);
return new Value(process, new EmptyExpression(), CorThread.Object);
}
}

1
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType-Helpers.cs

@ -279,6 +279,7 @@ namespace Debugger.MetaData @@ -279,6 +279,7 @@ namespace Debugger.MetaData
/// Returns simple managed type coresponding to the debug type.
/// Any class yields System.Object
/// </summary>
[Tests.Ignore]
public System.Type ManagedType {
get {
switch(this.corElementType) {

134
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

@ -19,6 +19,15 @@ namespace Debugger.MetaData @@ -19,6 +19,15 @@ namespace Debugger.MetaData
/// <remarks>
/// If two types are identical, the references to DebugType will also be identical
/// Type will be loaded once per each appdomain.
/// <para>
/// Preciesly one of these properties shall be true
/// - IsArray
/// - IsClass
/// - IsValueType
/// - IsPrimitive
/// - IsPointer
/// - IsVoid
/// </para>
/// </remarks>
public partial class DebugType: DebuggerObject
{
@ -98,30 +107,9 @@ namespace Debugger.MetaData @@ -98,30 +107,9 @@ namespace Debugger.MetaData
/// <remarks> Throws <see cref="System.ArgumentException"/> if type is not array </remarks>
public int GetArrayRank()
{
if (IsArray) {
return (int)corType.Rank;
} else {
throw new ArgumentException("Type is not array");
}
}
/// <summary> Returns true if the type has an element type.
/// (ie array, reference or pointer) </summary>
public bool HasElementType {
get {
return IsArray || IsPointer;
}
}
/// <summary> Returns an element type for array, reference or pointer.
/// Retuns null otherwise. (Secificaly, returns null for generic types) </summary>
public DebugType GetElementType()
{
if (HasElementType) {
return typeArguments[0];
} else {
return null;
}
if (!IsArray) throw new ArgumentException("Type is not array");
return (int)corType.Rank;
}
/// <summary> Gets a list of all interfaces that this type implements </summary>
@ -147,40 +135,43 @@ namespace Debugger.MetaData @@ -147,40 +135,43 @@ namespace Debugger.MetaData
}
}
/// <summary> Returns generics arguments for a type or an emtpy
/// array for non-generic types. </summary>
public DebugType[] GetGenericArguments()
{
if (IsGenericType) {
return typeArguments.ToArray();
} else {
return new DebugType[] {};
/// <summary> Get an element type for array or pointer. </summary>
public DebugType ElementType {
get {
if (this.IsArray || this.IsPointer) {
return typeArguments[0];
} else {
return null;
}
}
}
internal ICorDebugType[] GetGenericArgumentsAsCorDebugType()
{
List<ICorDebugType> types = new List<ICorDebugType>();
foreach(DebugType arg in this.GetGenericArguments()) {
types.Add(arg.CorType);
/// <summary> Gets generics arguments for a type or an emtpy array for non-generic types. </summary>
public List<DebugType> GenericArguments {
get {
if (this.IsArray || this.IsPointer) {
return new List<DebugType>();
} else {
return typeArguments;
}
}
return types.ToArray();
}
/// <summary> Gets a value indicating whether the type is an array </summary>
public bool IsArray {
internal ICorDebugType[] GenericArgumentsAsCorDebugType {
get {
return this.corElementType == CorElementType.ARRAY ||
this.corElementType == CorElementType.SZARRAY;
List<ICorDebugType> types = new List<ICorDebugType>();
foreach(DebugType arg in this.GenericArguments) {
types.Add(arg.CorType);
}
return types.ToArray();
}
}
/// <summary> Gets a value indicating whether the immediate type is generic.
/// Arrays, references and pointers are never generic types. </summary>
public bool IsGenericType {
/// <summary> Gets a value indicating whether the type is an array </summary>
public bool IsArray {
get {
return (IsClass || IsValueType) &&
typeArguments.Count > 0;
return this.corElementType == CorElementType.ARRAY ||
this.corElementType == CorElementType.SZARRAY;
}
}
@ -199,7 +190,8 @@ namespace Debugger.MetaData @@ -199,7 +190,8 @@ namespace Debugger.MetaData
}
}
/// <summary> Gets a value indicating whether the type is a value type (that is, a structre in C#) </summary>
/// <summary> Gets a value indicating whether the type is a value type (that is, a structre in C#).
/// Return false, if the type is a primitive type. </summary>
public bool IsValueType {
get {
return this.corElementType == CorElementType.VALUETYPE;
@ -207,6 +199,7 @@ namespace Debugger.MetaData @@ -207,6 +199,7 @@ namespace Debugger.MetaData
}
/// <summary> Gets a value indicating whether the type is a primitive type </summary>
/// <remarks> Primitive types are: boolean, char, string and all numeric types </remarks>
public bool IsPrimitive {
get {
return this.corElementType == CorElementType.BOOLEAN ||
@ -243,7 +236,14 @@ namespace Debugger.MetaData @@ -243,7 +236,14 @@ namespace Debugger.MetaData
}
}
[Tests.Ignore] // TODO: Remove
/// <summary> Gets a value indicating whether the type is an string </summary>
public bool IsString {
get {
return this.corElementType == CorElementType.STRING;
}
}
/// <summary> Gets a value indicating whether the type is an managed or unmanaged pointer </summary>
public bool IsPointer {
get {
return this.corElementType == CorElementType.PTR ||
@ -251,7 +251,7 @@ namespace Debugger.MetaData @@ -251,7 +251,7 @@ namespace Debugger.MetaData
}
}
[Tests.Ignore] // TODO: Remove
/// <summary> Gets a value indicating whether the type is the void type </summary>
public bool IsVoid {
get {
return this.corElementType == CorElementType.VOID;
@ -429,28 +429,28 @@ namespace Debugger.MetaData @@ -429,28 +429,28 @@ namespace Debugger.MetaData
string GetFullName()
{
if (IsArray) {
return GetElementType().FullName + "[" + new String(',', GetArrayRank() - 1) + "]";
return this.ElementType.FullName + "[" + new String(',', GetArrayRank() - 1) + "]";
} else if (IsClass || IsValueType) {
if (IsGenericType) {
List<string> argNames = new List<string>();
foreach(DebugType arg in GetGenericArguments()) {
argNames.Add(arg.FullName);
}
string className = classProps.Name;
// Remove generic parameter count at the end
// '`' might be missing in nested generic classes
int index = className.LastIndexOf('`');
if (index != -1) {
className = className.Substring(0, index);
}
List<string> argNames = new List<string>();
foreach(DebugType arg in this.GenericArguments) {
argNames.Add(arg.FullName);
}
string className = classProps.Name;
// Remove generic parameter count at the end
// '`' might be missing in nested generic classes
int index = className.LastIndexOf('`');
if (index != -1) {
className = className.Substring(0, index);
}
if (argNames.Count > 0) {
return className + "<" + String.Join(",", argNames.ToArray()) + ">";
} else {
return classProps.Name;
return className;
}
} else if (IsPrimitive) {
return this.ManagedType.ToString();
} else if (IsPointer) {
return this.GetElementType().FullName + (this.corElementType == CorElementType.BYREF ? "&" : "*");
return this.ElementType.FullName + (this.corElementType == CorElementType.BYREF ? "&" : "*");
} else if (IsVoid) {
return "System.Void";
} else {
@ -544,7 +544,7 @@ namespace Debugger.MetaData @@ -544,7 +544,7 @@ namespace Debugger.MetaData
if (this.IsArray) {
return other.IsArray &&
other.GetArrayRank() == this.GetArrayRank() &&
other.GetElementType().Equals(this.GetElementType());
other.ElementType.Equals(this.ElementType);
}
if (this.IsPrimitive) {
return other.IsPrimitive &&
@ -557,7 +557,7 @@ namespace Debugger.MetaData @@ -557,7 +557,7 @@ namespace Debugger.MetaData
}
if (this.IsPointer) {
return other.IsPointer &&
other.GetElementType().Equals(this.GetElementType());
other.ElementType.Equals(this.ElementType);
}
if (this.IsVoid) {
return other.IsVoid;

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

@ -21,16 +21,10 @@ namespace Debugger @@ -21,16 +21,10 @@ namespace Debugger
{
ICorDebugArrayValue CorArrayValue {
get {
if (!IsArray) throw new DebuggerException("Value is not an array");
if (IsNull) throw new GetValueException("Value is null");
if (!this.Type.IsArray) throw new DebuggerException("Value is not an array");
return this.CorReferenceValue.Dereference().CastTo<ICorDebugArrayValue>();
}
}
/// <summary> Returns true if the value is an array </summary>
public bool IsArray {
get {
return !IsNull && this.Type.IsArray;
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugArrayValue>();
}
}
@ -92,12 +86,6 @@ namespace Debugger @@ -92,12 +86,6 @@ namespace Debugger
// May be called later
ICorDebugValue GetCorValueOfArrayElement(int[] indices)
{
if (IsNull) {
throw new GetValueException("Null reference");
}
if (!IsArray) {
throw new GetValueException("The value is not an array");
}
if (indices.Length != ArrayRank) {
throw new GetValueException("Given indicies do not have the same dimension as array.");
}

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

@ -1,45 +0,0 @@ @@ -1,45 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Debugger.Wrappers.CorDebug;
namespace Debugger
{
public partial class Value
{
internal static ICorDebugValue DereferenceUnbox(ICorDebugValue corValue)
{
// Pointers may be used in 'unsafe' code - CorElementType.PTR
// Classes need to be dereferenced
while (corValue.Is<ICorDebugReferenceValue>()) {
ICorDebugReferenceValue refValue = corValue.CastTo<ICorDebugReferenceValue>();
if (refValue.IsNull != 0) {
return null; // Reference is null
} else {
try {
corValue = refValue.Dereference();
// TODO: Investigate: Must not acutally be null
// eg. Assembly.AssemblyHandle See SD2-1117
if (corValue == null) return null; // Dereference() returned null
} catch {
return null; // Error during dereferencing
}
}
}
// Unbox value types
if (corValue.Is<ICorDebugBoxValue>()) {
corValue = corValue.CastTo<ICorDebugBoxValue>().Object.CastTo<ICorDebugValue>();
}
return corValue;
}
}
}

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

@ -19,27 +19,21 @@ namespace Debugger @@ -19,27 +19,21 @@ namespace Debugger
{
internal ICorDebugObjectValue CorObjectValue {
get {
if (!IsObject) throw new DebuggerException("Value is not an object");
if (IsNull) throw new GetValueException("Value is null");
if (this.Type.IsClass) {
return this.CorReferenceValue.Dereference().CastTo<ICorDebugObjectValue>();
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugObjectValue>();
}
if (this.Type.IsValueType) {
// Dereference and unbox
if (corValue.Is<ICorDebugReferenceValue>()) {
return this.CorReferenceValue.Dereference().CastTo<ICorDebugBoxValue>().Object;
if (this.CorValue.Is<ICorDebugReferenceValue>()) {
// Dereference and unbox
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugBoxValue>().Object;
} else {
return corValue.CastTo<ICorDebugObjectValue>();
return this.CorValue.CastTo<ICorDebugObjectValue>();
}
}
throw new DebuggerException("Unknown type");
}
}
/// <summary> Returns true if the value is a class or value type </summary>
public bool IsObject {
get {
return !IsNull && (this.Type.IsClass || this.Type.IsValueType);
throw new DebuggerException("Value is not an object");
}
}
@ -245,7 +239,7 @@ namespace Debugger @@ -245,7 +239,7 @@ namespace Debugger
/// <summary> Invoke the ToString() method </summary>
public string InvokeToString()
{
if (IsPrimitive) return AsString;
if (this.Type.IsPrimitive) return AsString;
// if (!IsObject) // Can invoke on primitives
return Eval.InvokeMethod(Process, this.Type.AppDomainID, typeof(object), "ToString", this, new Value[] {}).AsString;
}
@ -305,7 +299,7 @@ namespace Debugger @@ -305,7 +299,7 @@ namespace Debugger
/// <param name="bindingFlags"> Get only members with certain flags </param>
public Value[] GetMemberValues(DebugType type, BindingFlags bindingFlags)
{
if (IsObject) {
if (this.Type.IsClass || this.Type.IsValueType) {
return new List<Value>(GetObjectMembersEnum(type, bindingFlags)).ToArray();
} else {
return new Value[0];

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

@ -17,42 +17,17 @@ namespace Debugger @@ -17,42 +17,17 @@ namespace Debugger
{
ICorDebugGenericValue CorGenericValue {
get {
if (!IsPrimitive) throw new DebuggerException("Value is not a primitive type");
if (!this.Type.IsPrimitive) throw new DebuggerException("Value is not a primitive type");
// Dereference and unbox
if (corValue.Is<ICorDebugReferenceValue>()) {
return this.CorReferenceValue.Dereference().CastTo<ICorDebugBoxValue>().Object.CastTo<ICorDebugGenericValue>();
if (this.CorValue.Is<ICorDebugReferenceValue>()) {
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugBoxValue>().Object.CastTo<ICorDebugGenericValue>();
} else {
return corValue.CastTo<ICorDebugGenericValue>();
return this.CorValue.CastTo<ICorDebugGenericValue>();
}
}
}
ICorDebugStringValue CorStringValue {
get {
if (CorType != CorElementType.STRING) throw new DebuggerException("Value is not a string");
return CorReferenceValue.Dereference().CastTo<ICorDebugStringValue>();
}
}
/// <summary>
/// Returns true if the value is an primitive type.
/// eg int, bool, string
/// </summary>
public bool IsPrimitive {
get {
return !IsNull && this.Type.IsPrimitive;
}
}
/// <summary> Gets a value indicating whether the type is an integer type </summary>
public bool IsInteger {
get {
return !IsNull && this.Type.IsInteger;
}
}
/// <summary>
/// Gets or sets the value of a primitive type.
///
@ -60,19 +35,15 @@ namespace Debugger @@ -60,19 +35,15 @@ namespace Debugger
/// </summary>
public object PrimitiveValue {
get {
if (!IsPrimitive) throw new DebuggerException("Value is not a primitive type");
if (CorType == CorElementType.STRING) {
if (IsNull) {
return null;
} else {
return this.CorStringValue.String;
}
if (this.Type.IsString) {
if (this.IsNull) return null;
return this.CorValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugStringValue>().String;
} else {
return CorGenericValue.Value;
}
}
set {
if (CorType == CorElementType.STRING) {
if (this.Type.IsString) {
throw new NotImplementedException();
} else {
if (value == null) {

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

@ -36,21 +36,22 @@ namespace Debugger @@ -36,21 +36,22 @@ namespace Debugger
/// <summary> Returns true if the value is null </summary>
public bool IsNull {
get {
return
(this.Type.IsClass || this.Type.IsValueType || this.Type.IsArray || this.CorType == CorElementType.STRING) &&
this.CorValue.Is<ICorDebugReferenceValue>() &&
this.CorReferenceValue.IsNull != 0;
return this.CorValue.Is<ICorDebugReferenceValue>() &&
this.CorValue.CastTo<ICorDebugReferenceValue>().IsNull != 0;
}
}
/// <summary> Gets a string representation of the value </summary>
public string AsString {
get {
if (IsNull) return "null";
if (IsArray) return "{" + this.Type.FullName + "}";
if (IsObject) return "{" + this.Type.FullName + "}";
if (IsPrimitive) return PrimitiveValue != null ? PrimitiveValue.ToString() : String.Empty;
throw new DebuggerException("Unknown value type");
if (this.IsNull) return "null";
if (this.Type.IsArray) return "{" + this.Type.FullName + "}";
if (this.Type.IsClass) return "{" + this.Type.FullName + "}";
if (this.Type.IsValueType) return "{" + this.Type.FullName + "}";
if (this.Type.IsPrimitive) return PrimitiveValue.ToString();
if (this.Type.IsPointer) return "0x" + this.CorValue.CastTo<ICorDebugReferenceValue>().Address.ToString("X8");
if (this.Type.IsVoid) return "void";
throw new DebuggerException("Unknown type");
}
}
@ -80,41 +81,16 @@ namespace Debugger @@ -80,41 +81,16 @@ namespace Debugger
}
}
ICorDebugReferenceValue CorReferenceValue {
get {
if (this.CorValue.Is<ICorDebugReferenceValue>()) {
return this.CorValue.CastTo<ICorDebugReferenceValue>();
} else {
throw new GetValueException("Reference value was expected");
}
}
}
internal CorElementType CorType {
get {
ICorDebugValue corValue = this.CorValue;
if (corValue == null) {
return (CorElementType)0;
}
return (CorElementType)corValue.Type;
}
}
public Value GetPermanentReference()
{
ICorDebugValue corValue = this.CorValue;
// TODO
if (this.Type.IsClass) {
corValue = this.CorObjectValue.CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
}
return new Value(process, expression, corValue);
}
internal Value(Process process, ICorDebugValue corValue)
:this (process, new EmptyExpression(), corValue)
{
}
internal Value(Process process, Expression expression, ICorDebugValue corValue)
{
if (corValue == null) {

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

@ -62,12 +62,8 @@ namespace Debugger.Tests { @@ -62,12 +62,8 @@ namespace Debugger.Tests {
ArrayRank="1"
AsString="{System.Int32[]}"
Expression="array"
IsArray="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32[]" />
</array>
@ -79,12 +75,8 @@ namespace Debugger.Tests { @@ -79,12 +75,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="0"
Expression="array[0]"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -95,12 +87,8 @@ namespace Debugger.Tests { @@ -95,12 +87,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="1"
Expression="array[1]"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -111,12 +99,8 @@ namespace Debugger.Tests { @@ -111,12 +99,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="2"
Expression="array[2]"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
@ -127,12 +111,8 @@ namespace Debugger.Tests { @@ -127,12 +111,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="3"
Expression="array[3]"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
@ -143,12 +123,8 @@ namespace Debugger.Tests { @@ -143,12 +123,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="4"
Expression="array[4]"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="4"
Type="System.Int32" />
</Item>
@ -156,47 +132,53 @@ namespace Debugger.Tests { @@ -156,47 +132,53 @@ namespace Debugger.Tests {
<type>
<DebugType
BaseType="System.Array"
ElementType="System.Int32"
FullName="System.Int32[]"
HasElementType="True"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="True"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="System.Array"
IsVoid="False"
Module="{Exception: The type is not a class or value type.}">
<BaseType>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="System.Array"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>
<DebugType
BaseType="null"
ElementType="null"
FullName="System.Object"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>null</BaseType>
</DebugType>
@ -212,12 +194,8 @@ namespace Debugger.Tests { @@ -212,12 +194,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="5"
Expression="array.Length"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="5"
Type="System.Int32" />
</array.Length>

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

File diff suppressed because it is too large Load Diff

16
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DefinedTypes.cs

@ -68,33 +68,37 @@ namespace Debugger.Tests { @@ -68,33 +68,37 @@ namespace Debugger.Tests {
<Item>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.DefinedTypes_Class"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="DefinedTypes.exe" />
</Item>
<Item>
<DebugType
BaseType="System.ValueType"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.DefinedTypes_Struct"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="True"
ManagedType="null"
IsVoid="False"
Module="DefinedTypes.exe" />
</Item>
</Types>

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

@ -104,12 +104,8 @@ namespace Debugger.Tests { @@ -104,12 +104,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="1"
Expression="i"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -120,29 +116,21 @@ namespace Debugger.Tests { @@ -120,29 +116,21 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="A"
Expression="s"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="A"
Type="System.String" />
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
ArrayDimensions="{Exception: Value is null}"
ArrayLenght="{Exception: Value is null}"
ArrayRank="{Exception: Value is null}"
AsString="null"
Expression="s_null"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="True"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
PrimitiveValue="null"
Type="System.String" />
</Item>
<Item>
@ -152,12 +140,8 @@ namespace Debugger.Tests { @@ -152,12 +140,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="2"
Expression="ref_i"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
@ -168,12 +152,8 @@ namespace Debugger.Tests { @@ -168,12 +152,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="3"
Expression="out_i"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
@ -184,12 +164,8 @@ namespace Debugger.Tests { @@ -184,12 +164,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="0"
Expression="out_i2"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -200,12 +176,8 @@ namespace Debugger.Tests { @@ -200,12 +176,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="B"
Expression="ref_s"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="B"
Type="System.String" />
</Item>
@ -216,12 +188,8 @@ namespace Debugger.Tests { @@ -216,12 +188,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="{System.Nullable&lt;System.Int32&gt;}"
Expression="iNull"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Nullable&lt;System.Int32&gt;" />
</Item>
@ -232,12 +200,8 @@ namespace Debugger.Tests { @@ -232,12 +200,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="{System.Nullable&lt;System.Int32&gt;}"
Expression="iNull_null"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Nullable&lt;System.Int32&gt;" />
</Item>
@ -253,12 +217,8 @@ namespace Debugger.Tests { @@ -253,12 +217,8 @@ namespace Debugger.Tests {
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsArray="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -274,12 +234,8 @@ namespace Debugger.Tests { @@ -274,12 +234,8 @@ namespace Debugger.Tests {
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsArray="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -295,12 +251,8 @@ namespace Debugger.Tests { @@ -295,12 +251,8 @@ namespace Debugger.Tests {
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsArray="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
@ -316,12 +268,8 @@ namespace Debugger.Tests { @@ -316,12 +268,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="1"
Expression="i"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -332,12 +280,8 @@ namespace Debugger.Tests { @@ -332,12 +280,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="A"
Expression="s"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="A"
Type="System.String" />
</Item>

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

@ -59,12 +59,8 @@ namespace Debugger.Tests { @@ -59,12 +59,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="0"
Expression="i"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -75,12 +71,8 @@ namespace Debugger.Tests { @@ -75,12 +71,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="S"
Expression="s"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="S"
Type="System.String" />
</Item>
@ -91,28 +83,20 @@ namespace Debugger.Tests { @@ -91,28 +83,20 @@ namespace Debugger.Tests {
ArrayRank="1"
AsString="{System.String[]}"
Expression="args"
IsArray="True"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
</Item>
<Item>
<Value
ArrayDimensions="{Exception: Value is not an array}"
ArrayLenght="{Exception: Value is not an array}"
ArrayRank="{Exception: Value is not an array}"
ArrayDimensions="{Exception: Value is null}"
ArrayLenght="{Exception: Value is null}"
ArrayRank="{Exception: Value is null}"
AsString="null"
Expression="n"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="True"
IsObject="False"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
</Item>
@ -123,12 +107,8 @@ namespace Debugger.Tests { @@ -123,12 +107,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="{System.Object}"
Expression="o"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Object" />
</Item>

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

@ -106,12 +106,8 @@ namespace Debugger.Tests { @@ -106,12 +106,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="1"
Expression="argument"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="1"
Type="System.Int32" />
</argument>
@ -122,12 +118,8 @@ namespace Debugger.Tests { @@ -122,12 +118,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="2"
Expression="local"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="2"
Type="System.Int32" />
</local>
@ -138,12 +130,8 @@ namespace Debugger.Tests { @@ -138,12 +130,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="3"
Expression="this.class"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="3"
Type="System.Int32" />
</_x0040_class>
@ -155,12 +143,8 @@ namespace Debugger.Tests { @@ -155,12 +143,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -171,12 +155,8 @@ namespace Debugger.Tests { @@ -171,12 +155,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -187,12 +167,8 @@ namespace Debugger.Tests { @@ -187,12 +167,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="this.class"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -203,12 +179,8 @@ namespace Debugger.Tests { @@ -203,12 +179,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="4"
Expression="localInSubFunction"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="4"
Type="System.Int32" />
</localInSubFunction>
@ -220,12 +192,8 @@ namespace Debugger.Tests { @@ -220,12 +192,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -236,12 +204,8 @@ namespace Debugger.Tests { @@ -236,12 +204,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -252,12 +216,8 @@ namespace Debugger.Tests { @@ -252,12 +216,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="this.class"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -268,12 +228,8 @@ namespace Debugger.Tests { @@ -268,12 +228,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="localInSubFunction"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</localInSubFunction>
@ -285,12 +241,8 @@ namespace Debugger.Tests { @@ -285,12 +241,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -301,12 +253,8 @@ namespace Debugger.Tests { @@ -301,12 +253,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -317,12 +265,8 @@ namespace Debugger.Tests { @@ -317,12 +265,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="this.class"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -333,12 +277,8 @@ namespace Debugger.Tests { @@ -333,12 +277,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="localInSubFunction"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</localInSubFunction>
@ -349,12 +289,8 @@ namespace Debugger.Tests { @@ -349,12 +289,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="4"
Expression="localInSubFunction"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="4"
Type="System.Int32" />
</localInSubFunction_x0028_new_x0029_>
@ -366,12 +302,8 @@ namespace Debugger.Tests { @@ -366,12 +302,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</argument>
@ -382,12 +314,8 @@ namespace Debugger.Tests { @@ -382,12 +314,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</local>
@ -398,12 +326,8 @@ namespace Debugger.Tests { @@ -398,12 +326,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="this.class"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</_x0040_class>
@ -414,12 +338,8 @@ namespace Debugger.Tests { @@ -414,12 +338,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is no longer valid}"
AsString="{Exception: Value is no longer valid}"
Expression="localInSubFunction"
IsArray="{Exception: Value is no longer valid}"
IsInteger="{Exception: Value is no longer valid}"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsObject="{Exception: Value is no longer valid}"
IsPrimitive="{Exception: Value is no longer valid}"
PrimitiveValue="{Exception: Value is no longer valid}"
Type="System.Int32" />
</localInSubFunction>

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

@ -155,17 +155,19 @@ namespace Debugger.Tests { @@ -155,17 +155,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -182,12 +184,8 @@ namespace Debugger.Tests { @@ -182,12 +184,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="1"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
@ -198,12 +196,8 @@ namespace Debugger.Tests { @@ -198,12 +196,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="1!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="1!"
Type="System.String" />
</Item>
@ -232,17 +226,19 @@ namespace Debugger.Tests { @@ -232,17 +226,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -259,12 +255,8 @@ namespace Debugger.Tests { @@ -259,12 +255,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="2"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
@ -275,12 +267,8 @@ namespace Debugger.Tests { @@ -275,12 +267,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="2!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="2!"
Type="System.String" />
</Item>
@ -309,17 +297,19 @@ namespace Debugger.Tests { @@ -309,17 +297,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -336,12 +326,8 @@ namespace Debugger.Tests { @@ -336,12 +326,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="3"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
@ -352,12 +338,8 @@ namespace Debugger.Tests { @@ -352,12 +338,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="3!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="3!"
Type="System.String" />
</Item>
@ -386,17 +368,19 @@ namespace Debugger.Tests { @@ -386,17 +368,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -413,12 +397,8 @@ namespace Debugger.Tests { @@ -413,12 +397,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="4"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="4"
Type="System.Int32" />
</Item>
@ -429,12 +409,8 @@ namespace Debugger.Tests { @@ -429,12 +409,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="4!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="4!"
Type="System.String" />
</Item>
@ -463,17 +439,19 @@ namespace Debugger.Tests { @@ -463,17 +439,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.ValueType"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="True"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -490,12 +468,8 @@ namespace Debugger.Tests { @@ -490,12 +468,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="5"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="5"
Type="System.Int32" />
</Item>
@ -506,12 +480,8 @@ namespace Debugger.Tests { @@ -506,12 +480,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="5!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="5!"
Type="System.String" />
</Item>
@ -540,17 +510,19 @@ namespace Debugger.Tests { @@ -540,17 +510,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.ValueType"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="True"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -567,12 +539,8 @@ namespace Debugger.Tests { @@ -567,12 +539,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="6"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="6"
Type="System.Int32" />
</Item>
@ -583,12 +551,8 @@ namespace Debugger.Tests { @@ -583,12 +551,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="6!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="6!"
Type="System.String" />
</Item>
@ -617,17 +581,19 @@ namespace Debugger.Tests { @@ -617,17 +581,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.ValueType"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="True"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -644,12 +610,8 @@ namespace Debugger.Tests { @@ -644,12 +610,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="7"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="7"
Type="System.Int32" />
</Item>
@ -660,12 +622,8 @@ namespace Debugger.Tests { @@ -660,12 +622,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="7!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="7!"
Type="System.String" />
</Item>
@ -694,17 +652,19 @@ namespace Debugger.Tests { @@ -694,17 +652,19 @@ namespace Debugger.Tests {
<DeclaringType>
<DebugType
BaseType="System.ValueType"
ElementType="null"
FullName="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="True"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="True"
ManagedType="null"
IsVoid="False"
Module="Generics.exe" />
</DeclaringType>
</MethodInfo>
@ -721,12 +681,8 @@ namespace Debugger.Tests { @@ -721,12 +681,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="8"
Expression="v"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="8"
Type="System.Int32" />
</Item>
@ -737,12 +693,8 @@ namespace Debugger.Tests { @@ -737,12 +693,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="8!"
Expression="k"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="8!"
Type="System.String" />
</Item>
@ -755,12 +707,8 @@ namespace Debugger.Tests { @@ -755,12 +707,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="0"
Expression="gClass.Prop"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="0"
Type="System.Int32" />
</Prop>
@ -771,12 +719,8 @@ namespace Debugger.Tests { @@ -771,12 +719,8 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="0"
Expression="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;.StaticProp"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="0"
Type="System.Int32" />
</StaticProp>

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

@ -66,43 +66,43 @@ namespace Debugger.Tests { @@ -66,43 +66,43 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="True"
Expression="b"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="True"
Type="System.Boolean">
<Type>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="System.Boolean"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="True"
IsString="False"
IsValueType="False"
ManagedType="System.Boolean"
IsVoid="False"
Module="{Exception: The type is not a class or value type.}">
<BaseType>
<DebugType
BaseType="null"
ElementType="null"
FullName="System.Object"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>null</BaseType>
</DebugType>
@ -118,43 +118,43 @@ namespace Debugger.Tests { @@ -118,43 +118,43 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="5"
Expression="i"
IsArray="False"
IsInteger="True"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="5"
Type="System.Int32">
<Type>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="System.Int32"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="True"
IsInterface="False"
IsPointer="False"
IsPrimitive="True"
IsString="False"
IsValueType="False"
ManagedType="System.Int32"
IsVoid="False"
Module="{Exception: The type is not a class or value type.}">
<BaseType>
<DebugType
BaseType="null"
ElementType="null"
FullName="System.Object"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>null</BaseType>
</DebugType>
@ -170,43 +170,43 @@ namespace Debugger.Tests { @@ -170,43 +170,43 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="five"
Expression="s"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="five"
Type="System.String">
<Type>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="System.String"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="True"
IsString="True"
IsValueType="False"
ManagedType="System.String"
IsVoid="False"
Module="{Exception: The type is not a class or value type.}">
<BaseType>
<DebugType
BaseType="null"
ElementType="null"
FullName="System.Object"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>null</BaseType>
</DebugType>
@ -222,43 +222,43 @@ namespace Debugger.Tests { @@ -222,43 +222,43 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="5.5"
Expression="d"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="False"
IsPrimitive="True"
PrimitiveValue="5.5"
Type="System.Double">
<Type>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="System.Double"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="True"
IsString="False"
IsValueType="False"
ManagedType="System.Double"
IsVoid="False"
Module="{Exception: The type is not a class or value type.}">
<BaseType>
<DebugType
BaseType="null"
ElementType="null"
FullName="System.Object"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>null</BaseType>
</DebugType>

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

@ -60,58 +60,60 @@ namespace Debugger.Tests { @@ -60,58 +60,60 @@ namespace Debugger.Tests {
ArrayRank="{Exception: Value is not an array}"
AsString="{Debugger.Tests.ValueType}"
Expression="this"
IsArray="False"
IsInteger="False"
IsInvalid="False"
IsNull="False"
IsObject="True"
IsPrimitive="False"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Debugger.Tests.ValueType">
<Type>
<DebugType
BaseType="System.ValueType"
ElementType="null"
FullName="Debugger.Tests.ValueType"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="False"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="True"
ManagedType="null"
IsVoid="False"
Module="ValueType.exe">
<BaseType>
<DebugType
BaseType="System.Object"
ElementType="null"
FullName="System.ValueType"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>
<DebugType
BaseType="null"
ElementType="null"
FullName="System.Object"
HasElementType="False"
GenericArguments="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
Interfaces="System.Collections.Generic.List`1[Debugger.MetaData.DebugType]"
IsArray="False"
IsClass="True"
IsGenericType="False"
IsInteger="False"
IsInterface="False"
IsPointer="False"
IsPrimitive="False"
IsString="False"
IsValueType="False"
ManagedType="null"
IsVoid="False"
Module="mscorlib.dll">
<BaseType>null</BaseType>
</DebugType>

Loading…
Cancel
Save