Browse Source

Removed Value.Name property.

Removed ValueCollection.  
Removed ExpressionCollection.  
Reorganized methods in StackFrame, added some convenience methods.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2863 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
882b0af0c5
  1. 19
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Expressions/SimpleIdentifierExpression.cs
  2. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs
  3. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  4. 21
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
  5. 140
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs
  6. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Ast/ThisReferenceExpression.cs
  7. 30
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Create.cs
  8. 16
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/ExpressionCollection.cs
  9. 11
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Types/MethodInfo.cs
  10. 14
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/Value.Array.cs
  11. 19
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/Value.Object.cs
  12. 7
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/Value.cs
  13. 105
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/ValueCollection.cs
  14. 1
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs
  15. 11
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
  16. 24
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs
  17. 7
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
  18. 31
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
  19. 32
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs
  20. 10
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
  21. 28
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
  22. 4
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs
  23. 304
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
  24. 4
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs
  25. 2
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs
  26. 3
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs

19
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Expressions/SimpleIdentifierExpression.cs

@ -31,11 +31,22 @@ namespace Debugger.Expressions @@ -31,11 +31,22 @@ namespace Debugger.Expressions
protected override Value EvaluateInternal(StackFrame context)
{
Value value = context.GetValue(identifier);
if (value == null) {
throw new GetValueException("Identifier " + identifier + " not found");
if (identifier == "this") {
return context.GetThisValue();
}
return value;
Value arg = context.GetArgumentValue(identifier);
if (arg != null) return arg;
Value local = context.GetLocalVariableValue(identifier);
if (local != null) return local;
if (!context.MethodInfo.IsStatic) {
Value member = context.GetThisValue().GetMemberValue(identifier);
if (member != null) return member;
}
throw new GetValueException("Identifier " + identifier + " not found");
}
}
}

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

@ -36,7 +36,7 @@ namespace Debugger.AddIn.TreeModel @@ -36,7 +36,7 @@ namespace Debugger.AddIn.TreeModel
this.Image = DebuggerIcons.ImageList.Images[1]; // Field
}
this.Name = val.Name;
this.Name = val.Expression.CodeTail;
if (ShowValuesInHexadecimal && val.IsInteger) {
this.Text = String.Format("0x{0:X}", val.PrimitiveValue);

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

@ -225,7 +225,6 @@ @@ -225,7 +225,6 @@
<Compile Include="Src\Variables\Expressions\Ast\ThisReferenceExpression.cs" />
<Compile Include="Src\Variables\Expressions\Expression.Create.cs" />
<Compile Include="Src\Variables\Expressions\Expression.cs" />
<Compile Include="Src\Variables\Expressions\ExpressionCollection.cs" />
<Compile Include="Src\Variables\Types\BindingFlags.cs" />
<Compile Include="Src\Variables\Types\DebugType-Helpers.cs" />
<Compile Include="Src\Variables\Types\DebugType.cs" />
@ -240,7 +239,6 @@ @@ -240,7 +239,6 @@
<Compile Include="Src\Variables\Values\Value.Object.cs" />
<Compile Include="Src\Variables\Values\Value.Primitive.cs" />
<Compile Include="Src\Variables\Values\Value.cs" />
<Compile Include="Src\Variables\Values\ValueCollection.cs" />
<Compile Include="Src\Wrappers\CorDebug\Autogenerated\CorDebug.cs" />
<Compile Include="Src\Wrappers\CorDebug\Autogenerated\CorDebugChainReason.cs" />
<Compile Include="Src\Wrappers\CorDebug\Autogenerated\CorDebugClass.cs" />

21
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs

@ -233,26 +233,5 @@ namespace Debugger @@ -233,26 +233,5 @@ namespace Debugger
}
}
}
public ValueCollection LocalVariables {
get {
if (SelectedStackFrame == null || IsRunning) {
return ValueCollection.Empty;
} else {
return SelectedStackFrame.Variables;
}
}
}
/// <summary> Gets value of given name which is accessible from selected stack frame </summary>
/// <returns> Null if not found </returns>
public Value GetValue(string name)
{
if (SelectedStackFrame == null || IsRunning) {
return null;
} else {
return SelectedStackFrame.GetValue(name);
}
}
}
}

140
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs

@ -293,64 +293,17 @@ namespace Debugger @@ -293,64 +293,17 @@ namespace Debugger
}
}
/// <summary> Gets value of given name which is accessible from this stack frame </summary>
/// <returns> Null if not found </returns>
public Value GetValue(string name)
{
if (name == "this") {
return ThisValue;
}
if (Arguments.Contains(name)) {
return Arguments[name];
}
if (LocalVariables.Contains(name)) {
return LocalVariables[name];
}
if (ContaingClassVariables.Contains(name)) {
return ContaingClassVariables[name];
}
return null;
}
/// <summary>
/// Gets all variables in the lexical scope of the stack frame.
/// That is, arguments, local variables and varables of the containing class.
/// </summary>
[Debugger.Tests.Ignore] // Accessible though others
public ValueCollection Variables {
get {
return new ValueCollection(GetVariables());
}
}
IEnumerable<Value> GetVariables()
{
if (!this.MethodInfo.IsStatic) {
yield return ThisValue;
}
foreach(Value val in Arguments) {
yield return val;
}
foreach(Value val in LocalVariables) {
yield return val;
}
foreach(Value val in ContaingClassVariables) {
yield return val;
}
}
/// <summary>
/// Gets the instance of the class asociated with the current frame.
/// That is, 'this' in C#.
/// </summary>
public Value ThisValue {
get {
return new Value(process, new ThisReferenceExpression(), ThisCorValue);
}
public Value GetThisValue()
{
return new Value(process, new ThisReferenceExpression(), GetThisCorValue());
}
ICorDebugValue ThisCorValue {
get {
ICorDebugValue GetThisCorValue()
{
if (this.MethodInfo.IsStatic) throw new GetValueException("Static method does not have 'this'.");
if (this.HasExpired) throw new GetValueException("StackFrame has expired");
try {
@ -361,21 +314,6 @@ namespace Debugger @@ -361,21 +314,6 @@ namespace Debugger
throw;
}
}
}
/// <summary>
/// Gets all accessible members of the class that defines this stack frame.
/// </summary>
public ValueCollection ContaingClassVariables {
get {
// TODO: Should work for static
if (!this.MethodInfo.IsStatic) {
return ThisValue.GetMemberValues();
} else {
return ValueCollection.Empty;
}
}
}
/// <summary> Total number of arguments (excluding implicit 'this' argument) </summary>
public int ArgumentCount {
@ -409,42 +347,38 @@ namespace Debugger @@ -409,42 +347,38 @@ namespace Debugger
}
}
/// <summary> Gets all arguments of the stack frame. </summary>
public ValueCollection Arguments {
get {
return new ValueCollection(ArgumentsEnum);
}
}
#region Convenience methods
IEnumerable<Value> ArgumentsEnum {
get {
for (int i = 0; i < ArgumentCount; i++) {
yield return GetArgumentValue(i);
/// <summary> Gets argument with a given name </summary>
/// <returns> Null if not found </returns>
public Value GetArgumentValue(string name)
{
for(int i = 0; i < this.ArgumentCount; i++) {
if (this.MethodInfo.GetParameterName(i) == name) {
return GetArgumentValue(i);
}
}
return null;
}
/// <summary> Gets all local variables of the stack frame. </summary>
public ValueCollection LocalVariables {
get {
return new ValueCollection(LocalVariablesEnum);
/// <summary> Gets all arguments of the stack frame. </summary>
public Value[] GetArgumentValues()
{
List<Value> values = new List<Value>();
for (int i = 0; i < ArgumentCount; i++) {
values.Add(GetArgumentValue(i));
}
return values.ToArray();
}
IEnumerable<Value> LocalVariablesEnum {
get {
foreach(ISymUnmanagedVariable symVar in this.MethodInfo.LocalVariables) {
yield return GetLocalVariableValue(symVar);
}
}
}
#endregion
public Value GetLocalVariableValue(ISymUnmanagedVariable symVar)
{
return new Value(this.Process, new LocalVariableIdentifierExpression(MethodInfo, symVar), GetCorValueOfLocalVariable(symVar));
return new Value(this.Process, new LocalVariableIdentifierExpression(MethodInfo, symVar), GetLocalVariableCorValue(symVar));
}
ICorDebugValue GetCorValueOfLocalVariable(ISymUnmanagedVariable symVar)
ICorDebugValue GetLocalVariableCorValue(ISymUnmanagedVariable symVar)
{
if (this.HasExpired) throw new GetValueException("StackFrame has expired");
@ -455,5 +389,31 @@ namespace Debugger @@ -455,5 +389,31 @@ namespace Debugger
throw;
}
}
#region Convenience methods
/// <summary> Get local variable with given name </summary>
/// <returns> Null if not found </returns>
public Value GetLocalVariableValue(string name)
{
foreach(ISymUnmanagedVariable symVar in this.MethodInfo.LocalVariables) {
if (symVar.Name == name) {
return GetLocalVariableValue(symVar);
}
}
return null;
}
/// <summary> Gets all local variables of the stack frame. </summary>
public Value[] GetLocalVariableValues()
{
List<Value> values = new List<Value>();
foreach(ISymUnmanagedVariable symVar in this.MethodInfo.LocalVariables) {
values.Add(GetLocalVariableValue(symVar));
}
return values.ToArray();
}
#endregion
}
}

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Ast/ThisReferenceExpression.cs

@ -22,7 +22,7 @@ namespace Debugger.Expressions @@ -22,7 +22,7 @@ namespace Debugger.Expressions
protected override Value EvaluateInternal(StackFrame context)
{
return context.ThisValue;
return context.GetThisValue();
}
}
}

30
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/Expression.Create.cs

@ -19,13 +19,13 @@ namespace Debugger.Expressions @@ -19,13 +19,13 @@ namespace Debugger.Expressions
return new ArrayIndexerExpression(this, indices);
}
public ExpressionCollection AppendIndexers(ArrayDimensions dimensions)
public Expression[] AppendIndexers(ArrayDimensions dimensions)
{
ExpressionCollection elements = new ExpressionCollection();
List<Expression> elements = new List<Expression>();
foreach(int[] indices in dimensions.Indices) {
elements.Add(this.AppendIndexer(indices));
}
return elements;
return elements.ToArray();
}
public Expression AppendFieldReference(FieldInfo fieldInfo)
@ -38,9 +38,9 @@ namespace Debugger.Expressions @@ -38,9 +38,9 @@ namespace Debugger.Expressions
return new MemberReferenceExpression(this, propertyInfo, null);
}
public ExpressionCollection AppendObjectMembers(DebugType type, BindingFlags bindingFlags)
public Expression[] AppendObjectMembers(DebugType type, BindingFlags bindingFlags)
{
ExpressionCollection members = new ExpressionCollection();
List<Expression> members = new List<Expression>();
foreach(FieldInfo field in type.GetFields(bindingFlags)) {
members.Add(this.AppendFieldReference(field));
@ -49,13 +49,13 @@ namespace Debugger.Expressions @@ -49,13 +49,13 @@ namespace Debugger.Expressions
members.Add(this.AppendPropertyReference(property));
}
return members;
return members.ToArray();
}
/// <summary> Get all variables for a method - this; parameters; local variables </summary>
public static ExpressionCollection MethodVariables(MethodInfo methodInfo)
public static Expression[] MethodVariables(MethodInfo methodInfo)
{
ExpressionCollection vars = new ExpressionCollection();
List<Expression> vars = new List<Expression>();
if (!methodInfo.IsStatic) {
vars.Add(MethodThis());
@ -63,7 +63,7 @@ namespace Debugger.Expressions @@ -63,7 +63,7 @@ namespace Debugger.Expressions
vars.AddRange(MethodParameters(methodInfo));
vars.AddRange(MethodLocalVariables(methodInfo));
return vars;
return vars.ToArray();
}
/// <summary> Get 'this' variable for a method </summary>
@ -73,27 +73,27 @@ namespace Debugger.Expressions @@ -73,27 +73,27 @@ namespace Debugger.Expressions
}
/// <summary> Get parameters of a method </summary>
public static ExpressionCollection MethodParameters(MethodInfo methodInfo)
public static Expression[] MethodParameters(MethodInfo methodInfo)
{
ExpressionCollection pars = new ExpressionCollection();
List<Expression> pars = new List<Expression>();
for(int i = 0; i < methodInfo.ParameterCount; i++) {
pars.Add(new ParameterIdentifierExpression(methodInfo, i));
}
return pars;
return pars.ToArray();
}
/// <summary> Get local variables of a method </summary>
public static ExpressionCollection MethodLocalVariables(MethodInfo methodInfo)
public static Expression[] MethodLocalVariables(MethodInfo methodInfo)
{
ExpressionCollection vars = new ExpressionCollection();
List<Expression> vars = new List<Expression>();
foreach(ISymUnmanagedVariable var in methodInfo.LocalVariables) {
vars.Add(new LocalVariableIdentifierExpression(methodInfo, var));
}
return vars;
return vars.ToArray();
}
}
}

16
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Expressions/ExpressionCollection.cs

@ -1,16 +0,0 @@ @@ -1,16 +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;
namespace Debugger.Expressions
{
public class ExpressionCollection: List<Expression>
{
}
}

11
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Types/MethodInfo.cs

@ -113,6 +113,7 @@ namespace Debugger @@ -113,6 +113,7 @@ namespace Debugger
}
}
/// <summary> Gets the number of paramters of this method </summary>
[Debugger.Tests.Ignore]
public int ParameterCount {
get {
@ -132,6 +133,16 @@ namespace Debugger @@ -132,6 +133,16 @@ namespace Debugger
}
}
/// <summary> Get names of all parameters in order </summary>
public string[] GetParameterNames()
{
List<string> names = new List<string>();
for(int i = 0; i < ParameterCount; i++) {
names.Add(GetParameterName(i));
}
return names.ToArray();
}
[Debugger.Tests.Ignore]
public List<ISymUnmanagedVariable> LocalVariables {
get {

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

@ -111,19 +111,13 @@ namespace Debugger @@ -111,19 +111,13 @@ namespace Debugger
}
/// <summary> Returns all elements in the array </summary>
public ValueCollection GetArrayElements()
public Value[] GetArrayElements()
{
return new ValueCollection(this.ArrayElements);
}
/// <summary> Enumerate over all array elements </summary>
[Debugger.Tests.Ignore]
public IEnumerable<Value> ArrayElements {
get {
List<Value> values = new List<Value>();
foreach(int[] indices in this.ArrayDimensions.Indices) {
yield return GetArrayElement(indices);
}
values.Add(GetArrayElement(indices));
}
return values.ToArray();
}
}
}

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

@ -256,9 +256,8 @@ namespace Debugger @@ -256,9 +256,8 @@ namespace Debugger
);
}
/// <summary>
/// Get a field or property of an object with a given name.
/// </summary>
/// <summary> Get a field or property of an object with a given name. </summary>
/// <returns> Null if not found </returns>
public Value GetMemberValue(string name)
{
DebugType currentType = this.Type;
@ -274,13 +273,11 @@ namespace Debugger @@ -274,13 +273,11 @@ namespace Debugger
}
currentType = currentType.BaseType;
}
throw new GetValueException("Member " + name + " was not found");
return null;
}
/// <summary>
/// Get all fields and properties of an object.
/// </summary>
public ValueCollection GetMemberValues()
/// <summary> Get all fields and properties of an object. </summary>
public Value[] GetMemberValues()
{
return GetMemberValues(null, BindingFlags.All);
}
@ -290,12 +287,12 @@ namespace Debugger @@ -290,12 +287,12 @@ namespace Debugger
/// </summary>
/// <param name="type"> Limit to type, null for all types </param>
/// <param name="bindingFlags"> Get only members with certain flags </param>
public ValueCollection GetMemberValues(DebugType type, BindingFlags bindingFlags)
public Value[] GetMemberValues(DebugType type, BindingFlags bindingFlags)
{
if (IsObject) {
return new ValueCollection(GetObjectMembersEnum(type, bindingFlags));
return new List<Value>(GetObjectMembersEnum(type, bindingFlags)).ToArray();
} else {
return ValueCollection.Empty;
return new Value[0];
}
}

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

@ -34,13 +34,6 @@ namespace Debugger @@ -34,13 +34,6 @@ namespace Debugger
get { return expression; }
}
/// <summary> Gets the name associated with the value </summary>
public string Name {
get {
return this.Expression.CodeTail;
}
}
/// <summary> Returns true if the value is null </summary>
public bool IsNull {
get {

105
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Values/ValueCollection.cs

@ -1,105 +0,0 @@ @@ -1,105 +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;
using System.Collections.Generic;
namespace Debugger
{
/// <summary>
/// An enumerable collection of values accessible by name.
/// </summary>
public class ValueCollection: DebuggerObject, IEnumerable<Value>, IEnumerable
{
internal static ValueCollection Empty = new ValueCollection(new Value[0]);
List<Value> list = new List<Value>();
Dictionary<string, List<Value>> hashtable = new Dictionary<string, List<Value>>();
IEnumerator<Value> IEnumerable<Value>.GetEnumerator()
{
foreach(Value namedValue in list) {
yield return namedValue;
}
}
IEnumerator IEnumerable.GetEnumerator()
{
foreach(Value namedValue in list) {
yield return namedValue;
}
}
internal ValueCollection(IEnumerable<Value> namedValues)
{
foreach(Value namedValue in namedValues) {
string name = namedValue.Name;
if (hashtable.ContainsKey(name)) {
hashtable[name].Add(namedValue);
} else {
hashtable[name] = new List<Value>(new Value[] {namedValue});
}
list.Add(namedValue);
}
}
/// <summary>
/// Gets a value indicating whether the collection contains a
/// value with a given name
/// </summary>
public bool Contains(string name)
{
return hashtable.ContainsKey(name);
}
/// <summary>
/// Gets number of <see cref="Debugger.NamedValue">named values</see> contained in the collection
/// </summary>
public int Count {
get {
return list.Count;
}
}
/// <summary>
/// Gets a value by index
/// </summary>
public Value this[int i] {
get {
return list[i];
}
}
/// <summary>
/// Gets a value by its name.
/// </summary>
public Value this[string variableName] {
get {
if (hashtable.ContainsKey(variableName)) {
foreach(Value val in hashtable[variableName]) {
return val;
}
}
// int index = variableName.IndexOf('.');
// if (index != -1) {
// string rootVariable = variableName.Substring(0, index);
// string subVariable = variableName.Substring(index + 1);
// return this[rootVariable].Value.SubVariables[subVariable];
// }
throw new DebuggerException("Variable \"" + variableName + "\" is not in collection");
}
}
public override string ToString()
{
return string.Format(@"[{0} Count={1}]", this.GetType().Name, this.Count);
}
}
}

1
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs

@ -237,6 +237,7 @@ namespace Debugger.Tests @@ -237,6 +237,7 @@ namespace Debugger.Tests
}
foreach(System.Reflection.PropertyInfo property in type.GetProperties()) {
if (type.BaseType == typeof(Array)) continue;
if (property.GetGetMethod() == null) continue;
if (property.GetGetMethod().GetParameters().Length > 0) continue;
if (property.GetCustomAttributes(typeof(Debugger.Tests.IgnoreAttribute), true).Length > 0) continue;

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

@ -31,7 +31,7 @@ namespace Debugger.Tests { @@ -31,7 +31,7 @@ namespace Debugger.Tests {
{
StartTest("ArrayValue.cs");
WaitForPause();
Value array = process.SelectedStackFrame.LocalVariables["array"];
Value array = process.SelectedStackFrame.GetLocalVariableValue("array");
ObjectDump("array", array);
ObjectDump("array elements", array.GetArrayElements());
@ -61,14 +61,12 @@ namespace Debugger.Tests { @@ -61,14 +61,12 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>array</Expression>
<Name>array</Name>
<IsNull>False</IsNull>
<AsString>{System.Int32[]}</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32[]</Type>
</array>
<array_elements Type="ValueCollection" ToString="[ValueCollection Count=5]">
<Count>5</Count>
<array_elements Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="array[0] = 0">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
@ -79,7 +77,6 @@ namespace Debugger.Tests { @@ -79,7 +77,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>0</PrimitiveValue>
<Expression>array[0]</Expression>
<Name>[0]</Name>
<IsNull>False</IsNull>
<AsString>0</AsString>
<HasExpired>False</HasExpired>
@ -95,7 +92,6 @@ namespace Debugger.Tests { @@ -95,7 +92,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>array[1]</Expression>
<Name>[1]</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
@ -111,7 +107,6 @@ namespace Debugger.Tests { @@ -111,7 +107,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>2</PrimitiveValue>
<Expression>array[2]</Expression>
<Name>[2]</Name>
<IsNull>False</IsNull>
<AsString>2</AsString>
<HasExpired>False</HasExpired>
@ -127,7 +122,6 @@ namespace Debugger.Tests { @@ -127,7 +122,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>3</PrimitiveValue>
<Expression>array[3]</Expression>
<Name>[3]</Name>
<IsNull>False</IsNull>
<AsString>3</AsString>
<HasExpired>False</HasExpired>
@ -143,7 +137,6 @@ namespace Debugger.Tests { @@ -143,7 +137,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>4</PrimitiveValue>
<Expression>array[4]</Expression>
<Name>[4]</Name>
<IsNull>False</IsNull>
<AsString>4</AsString>
<HasExpired>False</HasExpired>

24
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs

@ -70,33 +70,21 @@ namespace Debugger.Tests { @@ -70,33 +70,21 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=26,4 End=26,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Item>
<Item Type="StackFrame" ToString="Debugger.Tests.TestPrograms.Callstack.Sub1">
<MethodInfo>Sub1</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=21,4 End=21,11</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Item>
<Item Type="StackFrame" ToString="Debugger.Tests.TestPrograms.Callstack.Main">
<MethodInfo>Main</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=16,4 End=16,11</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Item>
</Callstack>
<DebuggingPaused>StepComplete</DebuggingPaused>
@ -107,22 +95,14 @@ namespace Debugger.Tests { @@ -107,22 +95,14 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=21,4 End=21,11</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Item>
<Item Type="StackFrame" ToString="Debugger.Tests.TestPrograms.Callstack.Main">
<MethodInfo>Main</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=16,4 End=16,11</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Item>
</Callstack>
<DebuggingPaused>StepComplete</DebuggingPaused>
@ -133,11 +113,7 @@ namespace Debugger.Tests { @@ -133,11 +113,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=16,4 End=16,11</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Item>
</Callstack>
<ProcessExited />

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

@ -59,10 +59,9 @@ namespace Debugger.Tests { @@ -59,10 +59,9 @@ namespace Debugger.Tests {
StartTest("Expressions.cs");
WaitForPause();
ObjectDump("Variables", process.SelectedStackFrame.Variables);
ObjectDump("array", process.SelectedStackFrame.Variables["array"].GetArrayElements());
ObjectDump("array2", process.SelectedStackFrame.Variables["array2"].GetArrayElements());
ObjectDump("this", process.SelectedStackFrame.ThisValue.GetMemberValues());
ObjectDump("Arguments", process.SelectedStackFrame.GetArgumentValues());
ObjectDump("LocalVariables", process.SelectedStackFrame.GetLocalVariableValues());
ObjectDump("this", process.SelectedStackFrame.GetThisValue().GetMemberValues());
process.Continue();
process.WaitForExit();

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

@ -77,7 +77,7 @@ namespace Debugger.Tests { @@ -77,7 +77,7 @@ namespace Debugger.Tests {
for(int i = 0; i < 5; i++) {
process.Continue();
WaitForPause();
ObjectDump("Arguments", process.SelectedStackFrame.Arguments);
ObjectDump("Arguments", process.SelectedStackFrame.GetArgumentValues());
}
process.Continue();
@ -97,8 +97,7 @@ namespace Debugger.Tests { @@ -97,8 +97,7 @@ namespace Debugger.Tests {
<ModuleLoaded symbols="True">FunctionArgumentVariables.exe</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<DebuggingPaused>Break</DebuggingPaused>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=9]">
<Count>9</Count>
<Arguments Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="i = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
@ -109,7 +108,6 @@ namespace Debugger.Tests { @@ -109,7 +108,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>i</Expression>
<Name>i</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
@ -125,7 +123,6 @@ namespace Debugger.Tests { @@ -125,7 +123,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue>A</PrimitiveValue>
<Expression>s</Expression>
<Name>s</Name>
<IsNull>False</IsNull>
<AsString>A</AsString>
<HasExpired>False</HasExpired>
@ -141,7 +138,6 @@ namespace Debugger.Tests { @@ -141,7 +138,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>s_null</Expression>
<Name>s_null</Name>
<IsNull>True</IsNull>
<AsString>&lt;null&gt;</AsString>
<HasExpired>False</HasExpired>
@ -157,7 +153,6 @@ namespace Debugger.Tests { @@ -157,7 +153,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>2</PrimitiveValue>
<Expression>ref_i</Expression>
<Name>ref_i</Name>
<IsNull>False</IsNull>
<AsString>2</AsString>
<HasExpired>False</HasExpired>
@ -173,7 +168,6 @@ namespace Debugger.Tests { @@ -173,7 +168,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>3</PrimitiveValue>
<Expression>out_i</Expression>
<Name>out_i</Name>
<IsNull>False</IsNull>
<AsString>3</AsString>
<HasExpired>False</HasExpired>
@ -189,7 +183,6 @@ namespace Debugger.Tests { @@ -189,7 +183,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>0</PrimitiveValue>
<Expression>out_i2</Expression>
<Name>out_i2</Name>
<IsNull>False</IsNull>
<AsString>0</AsString>
<HasExpired>False</HasExpired>
@ -205,7 +198,6 @@ namespace Debugger.Tests { @@ -205,7 +198,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue>B</PrimitiveValue>
<Expression>ref_s</Expression>
<Name>ref_s</Name>
<IsNull>False</IsNull>
<AsString>B</AsString>
<HasExpired>False</HasExpired>
@ -221,7 +213,6 @@ namespace Debugger.Tests { @@ -221,7 +213,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>iNull</Expression>
<Name>iNull</Name>
<IsNull>False</IsNull>
<AsString>{System.Nullable&lt;System.Int32&gt;}</AsString>
<HasExpired>False</HasExpired>
@ -237,7 +228,6 @@ namespace Debugger.Tests { @@ -237,7 +228,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>iNull_null</Expression>
<Name>iNull_null</Name>
<IsNull>False</IsNull>
<AsString>{System.Nullable&lt;System.Int32&gt;}</AsString>
<HasExpired>False</HasExpired>
@ -245,8 +235,7 @@ namespace Debugger.Tests { @@ -245,8 +235,7 @@ namespace Debugger.Tests {
</Item>
</Arguments>
<DebuggingPaused>Break</DebuggingPaused>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=1]">
<Count>1</Count>
<Arguments Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="args = {System.String[]}">
<IsArray>True</IsArray>
<ArrayLenght>0</ArrayLenght>
@ -257,7 +246,6 @@ namespace Debugger.Tests { @@ -257,7 +246,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>args</Expression>
<Name>args</Name>
<IsNull>False</IsNull>
<AsString>{System.String[]}</AsString>
<HasExpired>False</HasExpired>
@ -265,8 +253,7 @@ namespace Debugger.Tests { @@ -265,8 +253,7 @@ namespace Debugger.Tests {
</Item>
</Arguments>
<DebuggingPaused>Break</DebuggingPaused>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=1]">
<Count>1</Count>
<Arguments Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="args = {System.String[]}">
<IsArray>True</IsArray>
<ArrayLenght>1</ArrayLenght>
@ -277,7 +264,6 @@ namespace Debugger.Tests { @@ -277,7 +264,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>args</Expression>
<Name>args</Name>
<IsNull>False</IsNull>
<AsString>{System.String[]}</AsString>
<HasExpired>False</HasExpired>
@ -285,8 +271,7 @@ namespace Debugger.Tests { @@ -285,8 +271,7 @@ namespace Debugger.Tests {
</Item>
</Arguments>
<DebuggingPaused>Break</DebuggingPaused>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=1]">
<Count>1</Count>
<Arguments Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="args = {System.String[]}">
<IsArray>True</IsArray>
<ArrayLenght>2</ArrayLenght>
@ -297,7 +282,6 @@ namespace Debugger.Tests { @@ -297,7 +282,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>args</Expression>
<Name>args</Name>
<IsNull>False</IsNull>
<AsString>{System.String[]}</AsString>
<HasExpired>False</HasExpired>
@ -305,8 +289,7 @@ namespace Debugger.Tests { @@ -305,8 +289,7 @@ namespace Debugger.Tests {
</Item>
</Arguments>
<DebuggingPaused>Break</DebuggingPaused>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Arguments Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="i = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
@ -317,7 +300,6 @@ namespace Debugger.Tests { @@ -317,7 +300,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>i</Expression>
<Name>i</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
@ -333,7 +315,6 @@ namespace Debugger.Tests { @@ -333,7 +315,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue>A</PrimitiveValue>
<Expression>s</Expression>
<Name>s</Name>
<IsNull>False</IsNull>
<AsString>A</AsString>
<HasExpired>False</HasExpired>

32
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs

@ -80,11 +80,7 @@ namespace Debugger.Tests { @@ -80,11 +80,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=22,4 End=22,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>1</ArgumentCount>
<Arguments>[ValueCollection Count=1]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<Old_StackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.Function">
@ -92,22 +88,14 @@ namespace Debugger.Tests { @@ -92,22 +88,14 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>True</HasExpired>
<NextStatement exception="StackFrame has expired" />
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount exception="StackFrame has expired" />
<Arguments exception="StackFrame has expired" />
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Old_StackFrame>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.SubFunction">
<MethodInfo>SubFunction</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=29,4 End=29,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<Old_StackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.Function">
@ -115,22 +103,14 @@ namespace Debugger.Tests { @@ -115,22 +103,14 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>True</HasExpired>
<NextStatement exception="StackFrame has expired" />
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount exception="StackFrame has expired" />
<Arguments exception="StackFrame has expired" />
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Old_StackFrame>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.Function">
<MethodInfo>Function</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=24,4 End=24,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>1</ArgumentCount>
<Arguments>[ValueCollection Count=1]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<Main Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.Main">
@ -138,33 +118,21 @@ namespace Debugger.Tests { @@ -138,33 +118,21 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=17,4 End=17,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Main>
<Old_StackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.Function">
<MethodInfo>Function</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>True</HasExpired>
<NextStatement exception="StackFrame has expired" />
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount exception="StackFrame has expired" />
<Arguments exception="StackFrame has expired" />
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</Old_StackFrame>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.FunctionLifetime.Main">
<MethodInfo>Main</MethodInfo>
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=17,4 End=17,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>0</ArgumentCount>
<Arguments>[ValueCollection Count=0]</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<ProcessExited />
</Test>

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

@ -32,7 +32,7 @@ namespace Debugger.Tests { @@ -32,7 +32,7 @@ namespace Debugger.Tests {
{
StartTest("FunctionLocalVariables.cs");
WaitForPause();
ObjectDump("LocalVariables", process.SelectedStackFrame.LocalVariables);
ObjectDump("LocalVariables", process.SelectedStackFrame.GetLocalVariableValues());
process.Continue();
process.WaitForExit();
@ -50,8 +50,7 @@ namespace Debugger.Tests { @@ -50,8 +50,7 @@ namespace Debugger.Tests {
<ModuleLoaded symbols="False">mscorlib.dll</ModuleLoaded>
<ModuleLoaded symbols="True">FunctionLocalVariables.exe</ModuleLoaded>
<DebuggingPaused>Break</DebuggingPaused>
<LocalVariables Type="ValueCollection" ToString="[ValueCollection Count=5]">
<Count>5</Count>
<LocalVariables Type="Value[]" ToString="Debugger.Value[]">
<Item Type="Value" ToString="i = 0">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
@ -62,7 +61,6 @@ namespace Debugger.Tests { @@ -62,7 +61,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>0</PrimitiveValue>
<Expression>i</Expression>
<Name>i</Name>
<IsNull>False</IsNull>
<AsString>0</AsString>
<HasExpired>False</HasExpired>
@ -78,7 +76,6 @@ namespace Debugger.Tests { @@ -78,7 +76,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue>S</PrimitiveValue>
<Expression>s</Expression>
<Name>s</Name>
<IsNull>False</IsNull>
<AsString>S</AsString>
<HasExpired>False</HasExpired>
@ -94,7 +91,6 @@ namespace Debugger.Tests { @@ -94,7 +91,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>args</Expression>
<Name>args</Name>
<IsNull>False</IsNull>
<AsString>{System.String[]}</AsString>
<HasExpired>False</HasExpired>
@ -110,7 +106,6 @@ namespace Debugger.Tests { @@ -110,7 +106,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>n</Expression>
<Name>n</Name>
<IsNull>True</IsNull>
<AsString>&lt;null&gt;</AsString>
<HasExpired>False</HasExpired>
@ -126,7 +121,6 @@ namespace Debugger.Tests { @@ -126,7 +121,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>o</Expression>
<Name>o</Name>
<IsNull>False</IsNull>
<AsString>{System.Object}</AsString>
<HasExpired>False</HasExpired>

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

@ -51,15 +51,15 @@ namespace Debugger.Tests { @@ -51,15 +51,15 @@ namespace Debugger.Tests {
StartTest("FunctionVariablesLifetime.cs"); // 1 - Enter program
WaitForPause();
argument = process.SelectedStackFrame.GetArgumentValue(0);
local = process.SelectedStackFrame.LocalVariables["local"];
@class = process.SelectedStackFrame.ContaingClassVariables["class"];
local = process.SelectedStackFrame.GetLocalVariableValue("local");
@class = process.SelectedStackFrame.GetThisValue().GetMemberValue("class");
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
process.Continue(); // 2 - Go to the SubFunction
WaitForPause();
localInSubFunction = process.SelectedStackFrame.LocalVariables["localInSubFunction"];
localInSubFunction = process.SelectedStackFrame.GetLocalVariableValue("localInSubFunction");
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
@ -78,7 +78,7 @@ namespace Debugger.Tests { @@ -78,7 +78,7 @@ namespace Debugger.Tests {
ObjectDump("local", local);
ObjectDump("@class", @class);
ObjectDump("localInSubFunction", @localInSubFunction);
localInSubFunction = process.SelectedStackFrame.LocalVariables["localInSubFunction"];
localInSubFunction = process.SelectedStackFrame.GetLocalVariableValue("localInSubFunction");
ObjectDump("localInSubFunction(new)", @localInSubFunction);
process.Continue(); // 5 - Setp out of both functions
@ -114,7 +114,6 @@ namespace Debugger.Tests { @@ -114,7 +114,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>argument</Expression>
<Name>argument</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
@ -130,7 +129,6 @@ namespace Debugger.Tests { @@ -130,7 +129,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>2</PrimitiveValue>
<Expression>local</Expression>
<Name>local</Name>
<IsNull>False</IsNull>
<AsString>2</AsString>
<HasExpired>False</HasExpired>
@ -146,7 +144,6 @@ namespace Debugger.Tests { @@ -146,7 +144,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>3</PrimitiveValue>
<Expression>this.class</Expression>
<Name>class</Name>
<IsNull>False</IsNull>
<AsString>3</AsString>
<HasExpired>False</HasExpired>
@ -163,7 +160,6 @@ namespace Debugger.Tests { @@ -163,7 +160,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>argument</Expression>
<Name>argument</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -179,7 +175,6 @@ namespace Debugger.Tests { @@ -179,7 +175,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>local</Expression>
<Name>local</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -195,7 +190,6 @@ namespace Debugger.Tests { @@ -195,7 +190,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>this.class</Expression>
<Name>class</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -211,7 +205,6 @@ namespace Debugger.Tests { @@ -211,7 +205,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>4</PrimitiveValue>
<Expression>localInSubFunction</Expression>
<Name>localInSubFunction</Name>
<IsNull>False</IsNull>
<AsString>4</AsString>
<HasExpired>False</HasExpired>
@ -228,7 +221,6 @@ namespace Debugger.Tests { @@ -228,7 +221,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>argument</Expression>
<Name>argument</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -244,7 +236,6 @@ namespace Debugger.Tests { @@ -244,7 +236,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>local</Expression>
<Name>local</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -260,7 +251,6 @@ namespace Debugger.Tests { @@ -260,7 +251,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>this.class</Expression>
<Name>class</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -276,7 +266,6 @@ namespace Debugger.Tests { @@ -276,7 +266,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>localInSubFunction</Expression>
<Name>localInSubFunction</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -293,7 +282,6 @@ namespace Debugger.Tests { @@ -293,7 +282,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>argument</Expression>
<Name>argument</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -309,7 +297,6 @@ namespace Debugger.Tests { @@ -309,7 +297,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>local</Expression>
<Name>local</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -325,7 +312,6 @@ namespace Debugger.Tests { @@ -325,7 +312,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>this.class</Expression>
<Name>class</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -341,7 +327,6 @@ namespace Debugger.Tests { @@ -341,7 +327,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>localInSubFunction</Expression>
<Name>localInSubFunction</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -357,7 +342,6 @@ namespace Debugger.Tests { @@ -357,7 +342,6 @@ namespace Debugger.Tests {
<IsInteger>True</IsInteger>
<PrimitiveValue>4</PrimitiveValue>
<Expression>localInSubFunction</Expression>
<Name>localInSubFunction</Name>
<IsNull>False</IsNull>
<AsString>4</AsString>
<HasExpired>False</HasExpired>
@ -374,7 +358,6 @@ namespace Debugger.Tests { @@ -374,7 +358,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>argument</Expression>
<Name>argument</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -390,7 +373,6 @@ namespace Debugger.Tests { @@ -390,7 +373,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>local</Expression>
<Name>local</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -406,7 +388,6 @@ namespace Debugger.Tests { @@ -406,7 +388,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>this.class</Expression>
<Name>class</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>
@ -422,7 +403,6 @@ namespace Debugger.Tests { @@ -422,7 +403,6 @@ namespace Debugger.Tests {
<IsInteger exception="Value has expired" />
<PrimitiveValue exception="Value has expired" />
<Expression>localInSubFunction</Expression>
<Name>localInSubFunction</Name>
<IsNull exception="Value has expired" />
<AsString exception="Value has expired" />
<HasExpired>True</HasExpired>

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

@ -32,8 +32,8 @@ namespace Debugger.Tests { @@ -32,8 +32,8 @@ namespace Debugger.Tests {
{
StartTest("GenericDictionary.cs");
WaitForPause();
ObjectDump("dict", process.SelectedStackFrame.LocalVariables["dict"]);
ObjectDump("dict members", process.SelectedStackFrame.LocalVariables["dict"].GetMemberValues(null, BindingFlags.All));
ObjectDump("dict", process.SelectedStackFrame.GetLocalVariableValue("dict"));
ObjectDump("dict members", process.SelectedStackFrame.GetLocalVariableValue("dict").GetMemberValues(null, BindingFlags.All));
process.Continue();
process.WaitForExit();

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

@ -147,45 +147,7 @@ namespace Debugger.Tests { @@ -147,45 +147,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=36,4 End=36,40</NextStatement>
<ThisValue>this = {Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;}</ThisValue>
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;.GenericMethod">
@ -214,45 +176,7 @@ namespace Debugger.Tests { @@ -214,45 +176,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=42,4 End=42,40</NextStatement>
<ThisValue>this = {Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;}</ThisValue>
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;.StaticMetod">
@ -281,45 +205,7 @@ namespace Debugger.Tests { @@ -281,45 +205,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=48,4 End=48,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericClass&lt;System.Int32,System.String&gt;.StaticGenericMethod">
@ -348,45 +234,7 @@ namespace Debugger.Tests { @@ -348,45 +234,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=54,4 End=54,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;.Metod">
@ -415,45 +263,7 @@ namespace Debugger.Tests { @@ -415,45 +263,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=63,4 End=63,40</NextStatement>
<ThisValue>this = {Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;}</ThisValue>
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;.GenericMethod">
@ -482,45 +292,7 @@ namespace Debugger.Tests { @@ -482,45 +292,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=69,4 End=69,40</NextStatement>
<ThisValue>this = {Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;}</ThisValue>
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;.StaticMetod">
@ -549,45 +321,7 @@ namespace Debugger.Tests { @@ -549,45 +321,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=75,4 End=75,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<SelectedStackFrame Type="StackFrame" ToString="Debugger.Tests.TestPrograms.GenericStruct&lt;System.Int32,System.String&gt;.StaticGenericMethod">
@ -616,45 +350,7 @@ namespace Debugger.Tests { @@ -616,45 +350,7 @@ namespace Debugger.Tests {
<HasSymbols>True</HasSymbols>
<HasExpired>False</HasExpired>
<NextStatement>Start=81,4 End=81,40</NextStatement>
<ThisValue exception="Static method does not have 'this'." />
<ContaingClassVariables>[ValueCollection Count=0]</ContaingClassVariables>
<ArgumentCount>2</ArgumentCount>
<Arguments Type="ValueCollection" ToString="[ValueCollection Count=2]">
<Count>2</Count>
<Item Type="Value" ToString="v = 1">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>True</IsInteger>
<PrimitiveValue>1</PrimitiveValue>
<Expression>v</Expression>
<Name>v</Name>
<IsNull>False</IsNull>
<AsString>1</AsString>
<HasExpired>False</HasExpired>
<Type>System.Int32</Type>
</Item>
<Item Type="Value" ToString="k = 1!">
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>1!</PrimitiveValue>
<Expression>k</Expression>
<Name>k</Name>
<IsNull>False</IsNull>
<AsString>1!</AsString>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</Item>
</Arguments>
<LocalVariables>[ValueCollection Count=0]</LocalVariables>
</SelectedStackFrame>
<DebuggingPaused>Break</DebuggingPaused>
<ProcessExited />

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

@ -36,12 +36,12 @@ namespace Debugger.Tests { @@ -36,12 +36,12 @@ namespace Debugger.Tests {
StartTest("MetadataIdentity.cs");
WaitForPause();
DebugType type = process.SelectedStackFrame.ThisValue.Type;
DebugType type = process.SelectedStackFrame.GetThisValue().Type;
MethodInfo mainMethod = process.SelectedStackFrame.MethodInfo;
process.Continue();
WaitForPause();
Assert.AreEqual(type, process.SelectedStackFrame.ThisValue.Type);
Assert.AreEqual(type, process.SelectedStackFrame.GetThisValue().Type);
Assert.AreEqual(mainMethod, process.SelectedStackFrame.MethodInfo);
process.Continue();
process.WaitForExit();

2
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs

@ -47,7 +47,7 @@ namespace Debugger.Tests { @@ -47,7 +47,7 @@ namespace Debugger.Tests {
StartTest("ObjectValue.cs");
WaitForPause();
val = process.SelectedStackFrame.LocalVariables["val"];
val = process.SelectedStackFrame.GetLocalVariableValue("val");
ObjectDump("val", val);
ObjectDump("val members", val.GetMemberValues(null, Debugger.BindingFlags.All));
//ObjectDump("typeof(val)", val.Type);

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

@ -37,7 +37,7 @@ namespace Debugger.Tests { @@ -37,7 +37,7 @@ namespace Debugger.Tests {
StartTest("ValueType.cs");
WaitForPause();
ObjectDump("this", process.SelectedStackFrame.ThisValue);
ObjectDump("this", process.SelectedStackFrame.GetThisValue());
process.Continue();
process.WaitForExit();
CheckXmlOutput();
@ -64,7 +64,6 @@ namespace Debugger.Tests { @@ -64,7 +64,6 @@ namespace Debugger.Tests {
<IsInteger>False</IsInteger>
<PrimitiveValue exception="Value is not a primitive type" />
<Expression>this</Expression>
<Name>this</Name>
<IsNull>False</IsNull>
<AsString>{Debugger.Tests.ValueType}</AsString>
<HasExpired>False</HasExpired>

Loading…
Cancel
Save