Browse Source

Decoupled support for expressions from the debugger core

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5094 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 16 years ago
parent
commit
498a8e0a70
  1. 35
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs
  2. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs
  3. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Thread.cs
  4. 17
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Expressions/ExpressionEvaluator.cs
  5. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs
  6. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/MethodInfo.cs
  7. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Array.cs
  8. 7
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
  9. 24
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.cs
  10. 4
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs
  11. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ControlFlow_MainThreadExit.cs
  12. 70
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType.cs
  13. 42
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType_CompilerGeneratedClasses.cs
  14. 75
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
  15. 20
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackFrame_VariablesLifetime.cs
  16. 8
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Thread_Name.cs
  17. 7
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Value_Array.cs
  18. 16
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Value_GenericDictionary.cs
  19. 12
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Value_Object.cs
  20. 4
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Value_Primitive.cs

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

@ -36,7 +36,6 @@ namespace Debugger @@ -36,7 +36,6 @@ namespace Debugger
ICorDebugEval corEval;
Value result;
EvalState state;
Expression expression;
[Debugger.Tests.Ignore]
public AppDomain AppDomain {
@ -52,10 +51,6 @@ namespace Debugger @@ -52,10 +51,6 @@ namespace Debugger
get { return description; }
}
public Expression Expression {
get { return expression; }
}
ICorDebugEval CorEval {
get { return corEval; }
}
@ -87,12 +82,11 @@ namespace Debugger @@ -87,12 +82,11 @@ namespace Debugger
}
}
Eval(AppDomain appDomain, string description, Expression expression, EvalStarter evalStarter)
Eval(AppDomain appDomain, string description, EvalStarter evalStarter)
{
this.appDomain = appDomain;
this.process = appDomain.Process;
this.description = description;
this.expression = expression;
this.state = EvalState.Evaluating;
this.corEval = CreateCorEval(appDomain);
@ -192,7 +186,7 @@ namespace Debugger @@ -192,7 +186,7 @@ namespace Debugger
} else {
state = EvalState.EvaluatedException;
}
result = new Value(AppDomain, expression, corEval.Result);
result = new Value(AppDomain, corEval.Result);
}
}
@ -218,15 +212,9 @@ namespace Debugger @@ -218,15 +212,9 @@ namespace Debugger
public static Eval AsyncInvokeMethod(MethodInfo method, Value thisValue, Value[] args)
{
List<Expression> argExprs = new List<Expression>();
foreach(Value arg in args) {
argExprs.Add(arg.ExpressionTree);
}
return new Eval(
method.AppDomain,
"Function call: " + method.FullName,
ExpressionExtensionMethods.AppendMemberReference(method.IsStatic ? null : thisValue.ExpressionTree, method, argExprs.ToArray()),
delegate(Eval eval) {
MethodInvokeStarter(eval, method, thisValue, args);
}
@ -275,14 +263,13 @@ namespace Debugger @@ -275,14 +263,13 @@ namespace Debugger
ICorDebugClass corClass = DebugType.CreateFromType(appDomain, typeof(object)).CorType.Class;
ICorDebugEval corEval = CreateCorEval(appDomain);
ICorDebugValue corValue = corEval.CreateValue((uint)CorElementType.CLASS, corClass);
return new Value(appDomain, new PrimitiveExpression(value), corValue);
return new Value(appDomain, corValue);
} else if (value is string) {
return Eval.NewString(appDomain, (string)value);
} else {
// TODO: Check if it is primitive type
Value val = Eval.NewObjectNoConstructor(DebugType.CreateFromType(appDomain, value.GetType()));
val.PrimitiveValue = value;
val.ExpressionTree = new PrimitiveExpression(value);
return val;
}
}
@ -327,7 +314,6 @@ namespace Debugger @@ -327,7 +314,6 @@ namespace Debugger
return new Eval(
appDomain,
"New string: " + textToCreate,
new PrimitiveExpression(textToCreate),
delegate(Eval eval) {
eval.CorEval.CastTo<ICorDebugEval2>().NewStringWithLength(textToCreate, (uint)textToCreate.Length);
}
@ -350,7 +336,6 @@ namespace Debugger @@ -350,7 +336,6 @@ namespace Debugger
public static Eval AsyncNewObject(DebugType debugType, Value[] constructorArguments, DebugType[] constructorArgumentsTypes)
{
List<Expression> constructorArgumentsExpressions = SelectExpressions(constructorArguments);
ICorDebugValue[] constructorArgsCorDebug = ValuesAsCorDebug(constructorArguments);
MethodInfo constructor = debugType.GetMethod(".ctor", constructorArgumentsTypes);
if (constructor == null) {
@ -359,7 +344,6 @@ namespace Debugger @@ -359,7 +344,6 @@ namespace Debugger
return new Eval(
debugType.AppDomain,
"New object: " + debugType.FullName,
new ObjectCreateExpression(new TypeReference(debugType.FullName), constructorArgumentsExpressions),
delegate(Eval eval) {
eval.CorEval.CastTo<ICorDebugEval2>().NewParameterizedObject(
constructor.CorFunction, (uint)debugType.GenericArguments.Count, debugType.GenericArgumentsAsCorDebugType,
@ -373,7 +357,6 @@ namespace Debugger @@ -373,7 +357,6 @@ namespace Debugger
return new Eval(
debugType.AppDomain,
"New object: " + debugType.FullName,
new ObjectCreateExpression(new TypeReference(debugType.FullName), new List<Expression>()),
delegate(Eval eval) {
eval.CorEval.CastTo<ICorDebugEval2>().NewParameterizedObjectNoConstructor(debugType.CorType.Class, (uint)debugType.GenericArguments.Count, debugType.GenericArgumentsAsCorDebugType);
}
@ -383,20 +366,10 @@ namespace Debugger @@ -383,20 +366,10 @@ namespace Debugger
static ICorDebugValue[] ValuesAsCorDebug(Value[] values)
{
ICorDebugValue[] valuesAsCorDebug = new ICorDebugValue[values.Length];
for(int i = 0; i < values.Length; i++)
{
for(int i = 0; i < values.Length; i++) {
valuesAsCorDebug[i] = values[i].CorValue;
}
return valuesAsCorDebug;
}
static List<Expression> SelectExpressions(Value[] values)
{
List<Expression> expressions = new List<Expression>(values.Length);
foreach (Value value in values) {
expressions.Add(value.ExpressionTree);
}
return expressions;
}
}
}

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

@ -283,7 +283,7 @@ namespace Debugger @@ -283,7 +283,7 @@ namespace Debugger
/// </summary>
public Value GetThisValue()
{
return new Value(appDomain, new ThisReferenceExpression(), GetThisCorValue());
return new Value(appDomain, GetThisCorValue());
}
ICorDebugValue GetThisCorValue()
@ -320,7 +320,7 @@ namespace Debugger @@ -320,7 +320,7 @@ namespace Debugger
/// <param name="index"> Zero-based index </param>
public Value GetArgumentValue(int index)
{
return new Value(appDomain, new IdentifierExpression(methodInfo.GetParameterName(index)), GetArgumentCorValue(index));
return new Value(appDomain, GetArgumentCorValue(index));
}
ICorDebugValue GetArgumentCorValue(int index)

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

@ -160,7 +160,7 @@ namespace Debugger @@ -160,7 +160,7 @@ namespace Debugger
process.AssertPaused();
ICorDebugValue corValue = this.CorThread.Object;
return new Value(process.AppDomains[this.CorThread.AppDomain], Expression.Null, corValue);
return new Value(process.AppDomains[this.CorThread.AppDomain], corValue);
}
}

17
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Expressions/ExpressionEvaluator.cs

@ -19,9 +19,7 @@ namespace Debugger @@ -19,9 +19,7 @@ namespace Debugger
{
public class ExpressionEvaluator: NotImplementedAstVisitor
{
/// <summary> Evaluate given expression. If you have expression tree already, use overloads of this method.</summary>
/// <returns> Returned value or null for statements </returns>
public static Value Evaluate(string code, SupportedLanguage language, StackFrame context)
public static INode Parse(string code, SupportedLanguage language)
{
SnippetParser parser = new SnippetParser(language);
INode astRoot = parser.Parse(code);
@ -31,7 +29,14 @@ namespace Debugger @@ -31,7 +29,14 @@ namespace Debugger
if (parser.SnippetType != SnippetType.Expression && parser.SnippetType != SnippetType.Statements) {
throw new GetValueException("Code must be expression or statement");
}
return Evaluate(astRoot, context);
return astRoot;
}
/// <summary> Evaluate given expression. If you have expression tree already, use overloads of this method.</summary>
/// <returns> Returned value or null for statements </returns>
public static Value Evaluate(string code, SupportedLanguage language, StackFrame context)
{
return Evaluate(Parse(code, language), context);
}
public static Value Evaluate(INode code, Process context)
@ -110,12 +115,12 @@ namespace Debugger @@ -110,12 +115,12 @@ namespace Debugger
}
}
public Value Evaluate(INode expression)
Value Evaluate(INode expression)
{
return Evaluate(expression, true);
}
public Value Evaluate(INode expression, bool permRef)
Value Evaluate(INode expression, bool permRef)
{
// Try to get the value from cache
// (the cache is cleared when the process is resumed)

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Internal/ManagedCallback.cs

@ -482,7 +482,7 @@ namespace Debugger @@ -482,7 +482,7 @@ namespace Debugger
// Watch out for the zeros and null!
// Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0);
process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], new IdentifierExpression("__exception"), process.SelectedThread.CorThread.CurrentException));
process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.CurrentException));
process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState;
process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType;
process.SelectedThread.CurrentExceptionIsUnhandled = (ExceptionType)exceptionType == ExceptionType.Unhandled;

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/MethodInfo.cs

@ -553,7 +553,7 @@ namespace Debugger.MetaData @@ -553,7 +553,7 @@ namespace Debugger.MetaData
if ((uint)e.ErrorCode == 0x80131304) throw new GetValueException("Unavailable in optimized code");
throw;
}
return new Value(context.AppDomain, new IdentifierExpression(symVar.Name), corVal);
return new Value(context.AppDomain, corVal);
}
}

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

@ -85,7 +85,7 @@ namespace Debugger @@ -85,7 +85,7 @@ namespace Debugger
{
int[] indices = (int[])elementIndices.Clone();
return new Value(this.AppDomain, this.ExpressionTree.AppendIndexer(indices), GetCorValueOfArrayElement(indices));
return new Value(this.AppDomain, GetCorValueOfArrayElement(indices));
}
// May be called later

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

@ -93,7 +93,6 @@ namespace Debugger @@ -93,7 +93,6 @@ namespace Debugger
{
return new Value(
fieldInfo.AppDomain,
ExpressionExtensionMethods.AppendMemberReference(fieldInfo.IsStatic ? null : objectInstance.ExpressionTree, fieldInfo),
GetFieldCorValue(objectInstance, fieldInfo)
);
}
@ -142,12 +141,6 @@ namespace Debugger @@ -142,12 +141,6 @@ namespace Debugger
Value val = Value.InvokeMethod(objectInstance, propertyInfo.GetMethod, arguments);
List<Expression> argExprs = new List<Expression>();
foreach(Value arg in arguments) {
argExprs.Add(arg.ExpressionTree);
}
val.ExpressionTree = ExpressionExtensionMethods.AppendMemberReference(propertyInfo.IsStatic ? null : objectInstance.ExpressionTree, propertyInfo, argExprs.ToArray());
return val;
}

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

@ -23,23 +23,10 @@ namespace Debugger @@ -23,23 +23,10 @@ namespace Debugger
{
AppDomain appDomain;
Process process;
Expression expression;
ICorDebugValue corValue;
PauseSession corValue_pauseSession;
DebugType type;
/// <summary> Expression which can be used to reobtain this value. </summary>
public string Expression {
get { return expression.PrettyPrint(); }
}
/// <summary> Abstract syntax tree of the expression which can be used to reobtain this value. </summary>
[Tests.Ignore]
public Expression ExpressionTree {
get { return expression; }
set { expression = value; }
}
/// <summary> Returns true if the value is null </summary>
public bool IsNull {
get {
@ -135,7 +122,7 @@ namespace Debugger @@ -135,7 +122,7 @@ namespace Debugger
// Make the reference to box permanent
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
// Create new value
Value newValue = new Value(appDomain, expression, corValue);
Value newValue = new Value(appDomain, corValue);
// Copy the data inside the box
newValue.CorGenericValue.RawValue = rawValue;
return newValue;
@ -155,17 +142,16 @@ namespace Debugger @@ -155,17 +142,16 @@ namespace Debugger
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference().CastTo<ICorDebugHeapValue2>().CreateHandle(CorDebugHandleType.HANDLE_STRONG).CastTo<ICorDebugValue>();
}
}
return new Value(appDomain, expression, corValue);
return new Value(appDomain, corValue);
}
internal Value(AppDomain appDomain, Expression expression, ICorDebugValue corValue)
internal Value(AppDomain appDomain, ICorDebugValue corValue)
{
if (corValue == null) {
throw new ArgumentNullException("corValue");
}
this.appDomain = appDomain;
this.process = appDomain.Process;
this.expression = expression;
this.corValue = corValue;
this.corValue_pauseSession = process.PauseSession;
@ -206,7 +192,7 @@ namespace Debugger @@ -206,7 +192,7 @@ namespace Debugger
if (corRef.Value == 0 || corRef.Dereference() == null) {
return null;
} else {
return new Value(this.AppDomain, new UnaryOperatorExpression(this.ExpressionTree, UnaryOperatorType.Dereference), corRef.Dereference());
return new Value(this.AppDomain, corRef.Dereference());
}
}
@ -227,7 +213,7 @@ namespace Debugger @@ -227,7 +213,7 @@ namespace Debugger
public override string ToString()
{
return this.Expression + " = " + this.AsString;
return this.AsString;
}
}

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

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
// <version>$Revision$</version>
// </file>
using ICSharpCode.NRefactory.Ast;
using System;
using System.CodeDom.Compiler;
using System.Collections;
@ -15,7 +16,6 @@ using System.Reflection; @@ -15,7 +16,6 @@ using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Xml;
using Debugger;
using Debugger.Interop;
using Microsoft.CSharp;
@ -345,7 +345,7 @@ namespace Debugger.Tests @@ -345,7 +345,7 @@ namespace Debugger.Tests
string md5 = ToHexadecimal(new MD5CryptoServiceProvider().ComputeHash(Encoding.UTF8.GetBytes(code)));
string path = Path.GetTempPath();
path = Path.Combine(path, "SharpDevelop");
path = Path.Combine(path, "SharpDevelop4.0");
path = Path.Combine(path, "DebuggerTestsX86");
path = Path.Combine(path, testName + "." + md5);
Directory.CreateDirectory(path);

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ControlFlow_MainThreadExit.cs

@ -74,7 +74,7 @@ namespace Debugger.Tests { @@ -74,7 +74,7 @@ namespace Debugger.Tests {
Name=""
OldestStackFrame="Debugger.Tests.TestPrograms.ControlFlow_MainThreadExit.Main"
Priority="Normal"
RuntimeValue=" = {System.Threading.Thread}"
RuntimeValue="{System.Threading.Thread}"
SelectedStackFrame="Debugger.Tests.TestPrograms.ControlFlow_MainThreadExit.Main" />
</Item>
<Item>
@ -87,7 +87,7 @@ namespace Debugger.Tests { @@ -87,7 +87,7 @@ namespace Debugger.Tests {
Name="Worker thread"
OldestStackFrame="System.Threading.ThreadHelper.ThreadStart"
Priority="Normal"
RuntimeValue=" = {System.Threading.Thread}" />
RuntimeValue="{System.Threading.Thread}" />
</Item>
</ThreadsBeforeExit>
<DebuggingPaused>ForcedBreak ControlFlow_MainThreadExit.cs:29,4-29,26</DebuggingPaused>
@ -111,7 +111,7 @@ namespace Debugger.Tests { @@ -111,7 +111,7 @@ namespace Debugger.Tests {
Name="Worker thread"
OldestStackFrame="System.Threading.ThreadHelper.ThreadStart"
Priority="Normal"
RuntimeValue=" = {System.Threading.Thread}"
RuntimeValue="{System.Threading.Thread}"
SelectedStackFrame="Debugger.Tests.TestPrograms.ControlFlow_MainThreadExit.WaitForALongTime" />
</Item>
</ThreadsAfterExit>

70
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType.cs

@ -389,7 +389,7 @@ namespace Debugger.Tests { @@ -389,7 +389,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="nullObject"
Type="System.Object"
Value="nullObject = null">
Value="null">
<Type>
<DebugType
FullName="System.Object"
@ -405,7 +405,7 @@ namespace Debugger.Tests { @@ -405,7 +405,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="nullString"
Type="System.String"
Value="nullString = null">
Value="null">
<Type>
<DebugType
BaseType="System.Object"
@ -423,7 +423,7 @@ namespace Debugger.Tests { @@ -423,7 +423,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="nullMyClass"
Type="MyClass"
Value="nullMyClass = null">
Value="null">
<Type>
<DebugType
BaseType="System.Object"
@ -440,7 +440,7 @@ namespace Debugger.Tests { @@ -440,7 +440,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="i"
Type="System.Int32"
Value="i = 42">
Value="42">
<Type>
<DebugType
BaseType="System.Object"
@ -458,7 +458,7 @@ namespace Debugger.Tests { @@ -458,7 +458,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="b"
Type="System.Boolean"
Value="b = True">
Value="True">
<Type>
<DebugType
BaseType="System.Object"
@ -476,7 +476,7 @@ namespace Debugger.Tests { @@ -476,7 +476,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="c"
Type="System.Char"
Value="c = a">
Value="a">
<Type>
<DebugType
BaseType="System.Object"
@ -494,7 +494,7 @@ namespace Debugger.Tests { @@ -494,7 +494,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="obj"
Type="System.Object"
Value="obj = {System.Object}">
Value="{System.Object}">
<Type>
<DebugType
FullName="System.Object"
@ -510,7 +510,7 @@ namespace Debugger.Tests { @@ -510,7 +510,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myClass"
Type="MyClass"
Value="myClass = {MyClass}">
Value="{MyClass}">
<Type>
<DebugType
BaseType="System.Object"
@ -527,7 +527,7 @@ namespace Debugger.Tests { @@ -527,7 +527,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="point"
Type="MyStruct"
Value="point = {MyStruct}">
Value="{MyStruct}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -544,7 +544,7 @@ namespace Debugger.Tests { @@ -544,7 +544,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="box"
Type="System.Object"
Value="box = {System.Int32}">
Value="{System.Int32}">
<Type>
<DebugType
FullName="System.Object"
@ -560,7 +560,7 @@ namespace Debugger.Tests { @@ -560,7 +560,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="iPtr"
Type="System.Int32*"
Value="iPtr = {System.Int32*}">
Value="{System.Int32*}">
<Type>
<DebugType
ElementType="System.Int32"
@ -587,7 +587,7 @@ namespace Debugger.Tests { @@ -587,7 +587,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="iPtrPtr"
Type="System.Int32**"
Value="iPtrPtr = {System.Int32**}">
Value="{System.Int32**}">
<Type>
<DebugType
ElementType="System.Int32*"
@ -623,7 +623,7 @@ namespace Debugger.Tests { @@ -623,7 +623,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="bPtr"
Type="System.Boolean*"
Value="bPtr = {System.Boolean*}">
Value="{System.Boolean*}">
<Type>
<DebugType
ElementType="System.Boolean"
@ -650,7 +650,7 @@ namespace Debugger.Tests { @@ -650,7 +650,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="voidPtr"
Type="System.Void*"
Value="voidPtr = {System.Void*}">
Value="{System.Void*}">
<Type>
<DebugType
ElementType="System.Void"
@ -676,7 +676,7 @@ namespace Debugger.Tests { @@ -676,7 +676,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="pointPtr"
Type="MyStruct*"
Value="pointPtr = {MyStruct*}">
Value="{MyStruct*}">
<Type>
<DebugType
ElementType="MyStruct"
@ -702,7 +702,7 @@ namespace Debugger.Tests { @@ -702,7 +702,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="ptr"
Type="System.IntPtr"
Value="ptr = 0">
Value="0">
<Type>
<DebugType
BaseType="System.Object"
@ -720,7 +720,7 @@ namespace Debugger.Tests { @@ -720,7 +720,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="szArray"
Type="System.Char[]"
Value="szArray = {System.Char[]}">
Value="{System.Char[]}">
<Type>
<DebugType
BaseType="System.Array"
@ -748,7 +748,7 @@ namespace Debugger.Tests { @@ -748,7 +748,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="mdArray"
Type="System.Char[,]"
Value="mdArray = {System.Char[,]}">
Value="{System.Char[,]}">
<Type>
<DebugType
BaseType="System.Array"
@ -776,7 +776,7 @@ namespace Debugger.Tests { @@ -776,7 +776,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="nullable_value"
Type="System.Nullable&lt;System.Int32&gt;"
Value="nullable_value = {System.Nullable&lt;System.Int32&gt;}">
Value="{System.Nullable&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -794,7 +794,7 @@ namespace Debugger.Tests { @@ -794,7 +794,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="nullable_null"
Type="System.Nullable&lt;System.Int32&gt;"
Value="nullable_null = {System.Nullable&lt;System.Int32&gt;}">
Value="{System.Nullable&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -812,7 +812,7 @@ namespace Debugger.Tests { @@ -812,7 +812,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myGenClass_int"
Type="MyGenClass&lt;System.Int32&gt;"
Value="myGenClass_int = {MyGenClass&lt;System.Int32&gt;}">
Value="{MyGenClass&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.Object"
@ -830,7 +830,7 @@ namespace Debugger.Tests { @@ -830,7 +830,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="array_MyGenClass_int"
Type="MyGenClass&lt;System.Int32&gt;[]"
Value="array_MyGenClass_int = {MyGenClass&lt;System.Int32&gt;[]}">
Value="{MyGenClass&lt;System.Int32&gt;[]}">
<Type>
<DebugType
BaseType="System.Array"
@ -858,7 +858,7 @@ namespace Debugger.Tests { @@ -858,7 +858,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myGenClass_MyGenStruct_int"
Type="MyGenClass&lt;MyGenStruct&lt;System.Int32&gt;&gt;"
Value="myGenClass_MyGenStruct_int = {MyGenClass&lt;MyGenStruct&lt;System.Int32&gt;&gt;}">
Value="{MyGenClass&lt;MyGenStruct&lt;System.Int32&gt;&gt;}">
<Type>
<DebugType
BaseType="System.Object"
@ -876,7 +876,7 @@ namespace Debugger.Tests { @@ -876,7 +876,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myNestedClass"
Type="MyNestedClass&lt;System.Int32&gt;"
Value="myNestedClass = {MyNestedClass&lt;System.Int32&gt;}">
Value="{MyNestedClass&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.Object"
@ -894,7 +894,7 @@ namespace Debugger.Tests { @@ -894,7 +894,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myGenNestedClass"
Type="MyGenNestedClass&lt;System.Int32,System.Char&gt;"
Value="myGenNestedClass = {MyGenNestedClass&lt;System.Int32,System.Char&gt;}">
Value="{MyGenNestedClass&lt;System.Int32,System.Char&gt;}">
<Type>
<DebugType
BaseType="System.Object"
@ -912,7 +912,7 @@ namespace Debugger.Tests { @@ -912,7 +912,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myGenStruct_int"
Type="MyGenStruct&lt;System.Int32&gt;"
Value="myGenStruct_int = {MyGenStruct&lt;System.Int32&gt;}">
Value="{MyGenStruct&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -930,7 +930,7 @@ namespace Debugger.Tests { @@ -930,7 +930,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="array_MyGenStruct_int"
Type="MyGenStruct&lt;System.Int32&gt;[]"
Value="array_MyGenStruct_int = {MyGenStruct&lt;System.Int32&gt;[]}">
Value="{MyGenStruct&lt;System.Int32&gt;[]}">
<Type>
<DebugType
BaseType="System.Array"
@ -958,7 +958,7 @@ namespace Debugger.Tests { @@ -958,7 +958,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myGenStruct_MyGenClass_int"
Type="MyGenStruct&lt;MyGenClass&lt;System.Int32&gt;&gt;"
Value="myGenStruct_MyGenClass_int = {MyGenStruct&lt;MyGenClass&lt;System.Int32&gt;&gt;}">
Value="{MyGenStruct&lt;MyGenClass&lt;System.Int32&gt;&gt;}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -976,7 +976,7 @@ namespace Debugger.Tests { @@ -976,7 +976,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myGenNestedStruct"
Type="MyGenNestedStruct&lt;System.Int32,System.Char&gt;"
Value="myGenNestedStruct = {MyGenNestedStruct&lt;System.Int32,System.Char&gt;}">
Value="{MyGenNestedStruct&lt;System.Int32,System.Char&gt;}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -994,7 +994,7 @@ namespace Debugger.Tests { @@ -994,7 +994,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myInterfaceImpl"
Type="MyInterfaceImpl&lt;System.Int32&gt;"
Value="myInterfaceImpl = {MyInterfaceImpl&lt;System.Int32&gt;}">
Value="{MyInterfaceImpl&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.Object"
@ -1013,7 +1013,7 @@ namespace Debugger.Tests { @@ -1013,7 +1013,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="myInterface"
Type="MyInterface&lt;System.Int32,MyClass,MyStruct&gt;"
Value="myInterface = {MyInterfaceImpl&lt;System.Int32&gt;}">
Value="{MyInterfaceImpl&lt;System.Int32&gt;}">
<Type>
<DebugType
FullName="MyInterface&lt;System.Int32,MyClass,MyStruct&gt;"
@ -1030,7 +1030,7 @@ namespace Debugger.Tests { @@ -1030,7 +1030,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="list"
Type="System.Collections.Generic.List&lt;System.Int32&gt;"
Value="list = {System.Collections.Generic.List&lt;System.Int32&gt;}">
Value="{System.Collections.Generic.List&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.Object"
@ -1049,7 +1049,7 @@ namespace Debugger.Tests { @@ -1049,7 +1049,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="listEnum"
Type="Enumerator&lt;System.Int32&gt;"
Value="listEnum = {Enumerator&lt;System.Int32&gt;}">
Value="{Enumerator&lt;System.Int32&gt;}">
<Type>
<DebugType
BaseType="System.ValueType"
@ -1068,7 +1068,7 @@ namespace Debugger.Tests { @@ -1068,7 +1068,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="fnPtr"
Type="AddDelegate"
Value="fnPtr = {AddDelegate}">
Value="{AddDelegate}">
<Type>
<DebugType
BaseType="System.MulticastDelegate"
@ -1085,7 +1085,7 @@ namespace Debugger.Tests { @@ -1085,7 +1085,7 @@ namespace Debugger.Tests {
<LocalVariable
Name="access"
Type="Access"
Value="access = {Access}">
Value="{Access}">
<Type>
<DebugType
BaseType="System.Object"

42
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/DebugType_CompilerGeneratedClasses.cs

@ -103,22 +103,22 @@ namespace Debugger.Tests { @@ -103,22 +103,22 @@ namespace Debugger.Tests {
<Item>
<AnonymousType
Name="stateLessVar"
Value="stateLessVar = 201" />
Value="201" />
</Item>
<Item>
<AnonymousType
Name="deleg"
Value="deleg = null" />
Value="null" />
</Item>
<Item>
<AnonymousType
Name="stateLessVar_DelegRef"
Value="(()(CS$&lt;&gt;8__locals5)).stateLessVar_DelegRef = 202" />
Value="202" />
</Item>
<Item>
<AnonymousType
Name="stateLessVar_NestedDelegRef"
Value="(()(CS$&lt;&gt;8__locals5)).stateLessVar_NestedDelegRef = 203" />
Value="203" />
</Item>
</YieldLocalVariables>
<DebuggingPaused>Break DebugType_CompilerGeneratedClasses.cs:54,6-54,42</DebuggingPaused>
@ -126,47 +126,47 @@ namespace Debugger.Tests { @@ -126,47 +126,47 @@ namespace Debugger.Tests {
<Item>
<AnonymousType
Name="delegVar"
Value="delegVar = 301" />
Value="301" />
</Item>
<Item>
<AnonymousType
Name="nestedDeleg"
Value="nestedDeleg = {IntDelegate}" />
Value="{IntDelegate}" />
</Item>
<Item>
<AnonymousType
Name="delegVar_NestedDelegRef"
Value="(()(CS$&lt;&gt;8__locals7)).delegVar_NestedDelegRef = 302" />
Value="302" />
</Item>
<Item>
<AnonymousType
Name="delegArg_NestedDelegRef"
Value="(()(CS$&lt;&gt;8__locals7)).delegArg_NestedDelegRef = 401" />
Value="401" />
</Item>
<Item>
<AnonymousType
Name="stateLessVar_DelegRef"
Value="(()(this)).stateLessVar_DelegRef = 202" />
Value="202" />
</Item>
<Item>
<AnonymousType
Name="stateLessVar_NestedDelegRef"
Value="(()(this)).stateLessVar_NestedDelegRef = 203" />
Value="203" />
</Item>
<Item>
<AnonymousType
Name="stateFullVar_DelegRef"
Value="(()((()(this)).CS$&lt;&gt;8__locals3)).stateFullVar_DelegRef = 102" />
Value="102" />
</Item>
<Item>
<AnonymousType
Name="stateFullVar_NestedDelegRef"
Value="(()((()(this)).CS$&lt;&gt;8__locals3)).stateFullVar_NestedDelegRef = 103" />
Value="103" />
</Item>
<Item>
<AnonymousType
Name="this"
Value="(()((()(this)).CS$&lt;&gt;8__locals3)).&lt;&gt;4__this = {Debugger.Tests.TestPrograms.DebugType_CompilerGeneratedClasses}" />
Value="{Debugger.Tests.TestPrograms.DebugType_CompilerGeneratedClasses}" />
</Item>
</OutterDelegateLocalVariables>
<DebuggingPaused>Break DebugType_CompilerGeneratedClasses.cs:51,7-51,43</DebuggingPaused>
@ -174,42 +174,42 @@ namespace Debugger.Tests { @@ -174,42 +174,42 @@ namespace Debugger.Tests {
<Item>
<AnonymousType
Name="nestedDelegVar"
Value="nestedDelegVar = 303" />
Value="303" />
</Item>
<Item>
<AnonymousType
Name="delegVar_NestedDelegRef"
Value="(()(this)).delegVar_NestedDelegRef = 302" />
Value="302" />
</Item>
<Item>
<AnonymousType
Name="delegArg_NestedDelegRef"
Value="(()(this)).delegArg_NestedDelegRef = 401" />
Value="401" />
</Item>
<Item>
<AnonymousType
Name="stateLessVar_DelegRef"
Value="(()((()(this)).CS$&lt;&gt;8__locals5)).stateLessVar_DelegRef = 202" />
Value="202" />
</Item>
<Item>
<AnonymousType
Name="stateLessVar_NestedDelegRef"
Value="(()((()(this)).CS$&lt;&gt;8__locals5)).stateLessVar_NestedDelegRef = 203" />
Value="203" />
</Item>
<Item>
<AnonymousType
Name="stateFullVar_DelegRef"
Value="(()((()(this)).CS$&lt;&gt;8__locals3)).stateFullVar_DelegRef = 102" />
Value="102" />
</Item>
<Item>
<AnonymousType
Name="stateFullVar_NestedDelegRef"
Value="(()((()(this)).CS$&lt;&gt;8__locals3)).stateFullVar_NestedDelegRef = 103" />
Value="103" />
</Item>
<Item>
<AnonymousType
Name="this"
Value="(()((()(this)).CS$&lt;&gt;8__locals3)).&lt;&gt;4__this = {Debugger.Tests.TestPrograms.DebugType_CompilerGeneratedClasses}" />
Value="{Debugger.Tests.TestPrograms.DebugType_CompilerGeneratedClasses}" />
</Item>
</InnterDelegateLocalVariables>
<ProcessExited />

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

@ -77,6 +77,8 @@ namespace Debugger.Tests.TestPrograms @@ -77,6 +77,8 @@ namespace Debugger.Tests.TestPrograms
#if TEST_CODE
namespace Debugger.Tests {
using ICSharpCode.NRefactory.Ast;
public partial class DebuggerTests
{
[NUnit.Framework.Test]
@ -90,16 +92,16 @@ namespace Debugger.Tests { @@ -90,16 +92,16 @@ namespace Debugger.Tests {
ObjectDump("methods", process.SelectedStackFrame.MethodInfo.DeclaringType.GetMethods());
Value thisVal = process.SelectedStackFrame.GetThisValue().GetPermanentReference();
Value baseMethodVal = thisVal.GetMemberValue(thisVal.Type.BaseType.GetMethod("Foo", "i"), Debugger.Eval.CreateValue(process.SelectedStackFrame.AppDomain, 1));
ObjectDump("BaseMethod", baseMethodVal);
Value derivedMethodVal = thisVal.GetMemberValue(thisVal.Type.GetMethod("Foo", "i"), Debugger.Eval.CreateValue(process.SelectedStackFrame.AppDomain, 1));
ObjectDump("HiddenMethod", derivedMethodVal);
Value overloadMethodVal = thisVal.GetMemberValue(thisVal.Type.GetMethod("Foo", "s"), Debugger.Eval.CreateValue(process.SelectedStackFrame.AppDomain, "a"));
ObjectDump("HiddenMethod", overloadMethodVal);
Expression baseMethod = new ThisReferenceExpression().AppendMemberReference(thisVal.Type.BaseType.GetMethod("Foo", "i"), new PrimitiveExpression(1));
Expression derivedMethod = new ThisReferenceExpression().AppendMemberReference(thisVal.Type.GetMethod("Foo", "i"), new PrimitiveExpression(1));
Expression overloadMethod = new ThisReferenceExpression().AppendMemberReference(thisVal.Type.GetMethod("Foo", "s"), new PrimitiveExpression("a"));
ObjectDump("BaseMethod_reeval", baseMethodVal.ExpressionTree.Evaluate(process));
ObjectDump("HiddenMethod_reeval", derivedMethodVal.ExpressionTree.Evaluate(process));
ObjectDump("HiddenMethod_reeval", overloadMethodVal.ExpressionTree.Evaluate(process));
ObjectDump("BaseMethod", baseMethod.PrettyPrint());
ObjectDump("BaseMethod-Eval", baseMethod.Evaluate(process));
ObjectDump("HiddenMethod", derivedMethod.PrettyPrint());
ObjectDump("HiddenMethod-Eval", derivedMethod.Evaluate(process));
ObjectDump("OverloadMethod", overloadMethod.PrettyPrint());
ObjectDump("OverloadMethod-Eval", overloadMethod.Evaluate(process));
EndTest();
}
@ -122,7 +124,6 @@ namespace Debugger.Tests { @@ -122,7 +124,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="argValue"
Expression="arg"
IsReference="True"
PrimitiveValue="argValue"
Type="System.String" />
@ -134,7 +135,6 @@ namespace Debugger.Tests { @@ -134,7 +135,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="0"
Expression="i"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
@ -144,7 +144,6 @@ namespace Debugger.Tests { @@ -144,7 +144,6 @@ namespace Debugger.Tests {
ArrayLength="3"
ArrayRank="1"
AsString="{System.String[]}"
Expression="array"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
@ -155,7 +154,6 @@ namespace Debugger.Tests { @@ -155,7 +154,6 @@ namespace Debugger.Tests {
ArrayLength="4"
ArrayRank="2"
AsString="{System.String[,]}"
Expression="array2"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[,]" />
@ -163,7 +161,6 @@ namespace Debugger.Tests { @@ -163,7 +161,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="baseClassString"
Expression="BaseClass"
IsReference="True"
PrimitiveValue="baseClassString"
Type="System.String" />
@ -173,7 +170,6 @@ namespace Debugger.Tests { @@ -173,7 +170,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="derived name"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).name"
IsReference="True"
PrimitiveValue="derived name"
Type="System.String" />
@ -181,7 +177,6 @@ namespace Debugger.Tests { @@ -181,7 +177,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="derived value"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).Value"
IsReference="True"
PrimitiveValue="derived value"
Type="System.String" />
@ -189,7 +184,6 @@ namespace Debugger.Tests { @@ -189,7 +184,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="field value"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).field"
IsReference="True"
PrimitiveValue="field value"
Type="System.String" />
@ -200,7 +194,6 @@ namespace Debugger.Tests { @@ -200,7 +194,6 @@ namespace Debugger.Tests {
ArrayLength="3"
ArrayRank="1"
AsString="{System.String[]}"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).array"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.String[]" />
@ -208,7 +201,6 @@ namespace Debugger.Tests { @@ -208,7 +201,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="base name"
Expression="((Debugger.Tests.TestPrograms.BaseClass)(this)).name"
IsReference="True"
PrimitiveValue="base name"
Type="System.String" />
@ -216,7 +208,6 @@ namespace Debugger.Tests { @@ -216,7 +208,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="base value"
Expression="((Debugger.Tests.TestPrograms.BaseClass)(this)).Value"
IsReference="True"
PrimitiveValue="base value"
Type="System.String" />
@ -224,7 +215,6 @@ namespace Debugger.Tests { @@ -224,7 +215,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="derived name"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).Name"
IsReference="True"
PrimitiveValue="derived name"
Type="System.String" />
@ -232,7 +222,6 @@ namespace Debugger.Tests { @@ -232,7 +222,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="base name"
Expression="((Debugger.Tests.TestPrograms.BaseClass)(this)).Name"
IsReference="True"
PrimitiveValue="base name"
Type="System.String" />
@ -324,54 +313,30 @@ namespace Debugger.Tests { @@ -324,54 +313,30 @@ namespace Debugger.Tests {
Name=".ctor" />
</Item>
</methods>
<BaseMethod>
<Value
AsString="base-int"
Expression="((Debugger.Tests.TestPrograms.BaseClass)(this)).Foo((System.Int32)(1))"
IsReference="True"
PrimitiveValue="base-int"
Type="System.String" />
</BaseMethod>
<HiddenMethod>
<Value
AsString="deriv-int"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).Foo((System.Int32)(1))"
IsReference="True"
PrimitiveValue="deriv-int"
Type="System.String" />
</HiddenMethod>
<HiddenMethod>
<Value
AsString="deriv-string"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).Foo((System.String)(&quot;a&quot;))"
IsReference="True"
PrimitiveValue="deriv-string"
Type="System.String" />
</HiddenMethod>
<BaseMethod_reeval>
<BaseMethod>((Debugger.Tests.TestPrograms.BaseClass)(this)).Foo((System.Int32)(1))</BaseMethod>
<BaseMethod-Eval>
<Value
AsString="base-int"
Expression="((Debugger.Tests.TestPrograms.BaseClass)(this)).Foo((System.Int32)(1))"
IsReference="True"
PrimitiveValue="base-int"
Type="System.String" />
</BaseMethod_reeval>
<HiddenMethod_reeval>
</BaseMethod-Eval>
<HiddenMethod>((Debugger.Tests.TestPrograms.TestClass)(this)).Foo((System.Int32)(1))</HiddenMethod>
<HiddenMethod-Eval>
<Value
AsString="deriv-int"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).Foo((System.Int32)(1))"
IsReference="True"
PrimitiveValue="deriv-int"
Type="System.String" />
</HiddenMethod_reeval>
<HiddenMethod_reeval>
</HiddenMethod-Eval>
<OverloadMethod>((Debugger.Tests.TestPrograms.TestClass)(this)).Foo((System.String)("a"))</OverloadMethod>
<OverloadMethod-Eval>
<Value
AsString="deriv-string"
Expression="((Debugger.Tests.TestPrograms.TestClass)(this)).Foo((System.String)(&quot;a&quot;))"
IsReference="True"
PrimitiveValue="deriv-string"
Type="System.String" />
</HiddenMethod_reeval>
</OverloadMethod-Eval>
<ProcessExited />
</Test>
</DebuggerTests>

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

@ -102,21 +102,18 @@ namespace Debugger.Tests { @@ -102,21 +102,18 @@ namespace Debugger.Tests {
<argument>
<Value
AsString="1"
Expression="argument"
PrimitiveValue="1"
Type="System.Int32" />
</argument>
<local>
<Value
AsString="2"
Expression="local"
PrimitiveValue="2"
Type="System.Int32" />
</local>
<_x0040_class>
<Value
AsString="3"
Expression="((Debugger.Tests.TestPrograms.StackFrame_VariablesLifetime)(this)).@class"
PrimitiveValue="3"
Type="System.Int32" />
</_x0040_class>
@ -124,7 +121,6 @@ namespace Debugger.Tests { @@ -124,7 +121,6 @@ namespace Debugger.Tests {
<argument>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -134,7 +130,6 @@ namespace Debugger.Tests { @@ -134,7 +130,6 @@ namespace Debugger.Tests {
<local>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -144,7 +139,6 @@ namespace Debugger.Tests { @@ -144,7 +139,6 @@ namespace Debugger.Tests {
<_x0040_class>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="((Debugger.Tests.TestPrograms.StackFrame_VariablesLifetime)(this)).@class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -154,7 +148,6 @@ namespace Debugger.Tests { @@ -154,7 +148,6 @@ namespace Debugger.Tests {
<localInSubFunction>
<Value
AsString="4"
Expression="localInSubFunction"
PrimitiveValue="4"
Type="System.Int32" />
</localInSubFunction>
@ -162,7 +155,6 @@ namespace Debugger.Tests { @@ -162,7 +155,6 @@ namespace Debugger.Tests {
<argument>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -172,7 +164,6 @@ namespace Debugger.Tests { @@ -172,7 +164,6 @@ namespace Debugger.Tests {
<local>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -182,7 +173,6 @@ namespace Debugger.Tests { @@ -182,7 +173,6 @@ namespace Debugger.Tests {
<_x0040_class>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="((Debugger.Tests.TestPrograms.StackFrame_VariablesLifetime)(this)).@class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -192,7 +182,6 @@ namespace Debugger.Tests { @@ -192,7 +182,6 @@ namespace Debugger.Tests {
<localInSubFunction>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="localInSubFunction"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -203,7 +192,6 @@ namespace Debugger.Tests { @@ -203,7 +192,6 @@ namespace Debugger.Tests {
<argument>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -213,7 +201,6 @@ namespace Debugger.Tests { @@ -213,7 +201,6 @@ namespace Debugger.Tests {
<local>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -223,7 +210,6 @@ namespace Debugger.Tests { @@ -223,7 +210,6 @@ namespace Debugger.Tests {
<_x0040_class>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="((Debugger.Tests.TestPrograms.StackFrame_VariablesLifetime)(this)).@class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -233,7 +219,6 @@ namespace Debugger.Tests { @@ -233,7 +219,6 @@ namespace Debugger.Tests {
<localInSubFunction>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="localInSubFunction"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -243,7 +228,6 @@ namespace Debugger.Tests { @@ -243,7 +228,6 @@ namespace Debugger.Tests {
<localInSubFunction_x0028_new_x0029_>
<Value
AsString="4"
Expression="localInSubFunction"
PrimitiveValue="4"
Type="System.Int32" />
</localInSubFunction_x0028_new_x0029_>
@ -251,7 +235,6 @@ namespace Debugger.Tests { @@ -251,7 +235,6 @@ namespace Debugger.Tests {
<argument>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="argument"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -261,7 +244,6 @@ namespace Debugger.Tests { @@ -261,7 +244,6 @@ namespace Debugger.Tests {
<local>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="local"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -271,7 +253,6 @@ namespace Debugger.Tests { @@ -271,7 +253,6 @@ namespace Debugger.Tests {
<_x0040_class>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="((Debugger.Tests.TestPrograms.StackFrame_VariablesLifetime)(this)).@class"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"
@ -281,7 +262,6 @@ namespace Debugger.Tests { @@ -281,7 +262,6 @@ namespace Debugger.Tests {
<localInSubFunction>
<Value
AsString="{Exception: Value is no longer valid}"
Expression="localInSubFunction"
IsInvalid="True"
IsNull="{Exception: Value is no longer valid}"
IsReference="{Exception: Value is no longer valid}"

8
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Thread_Name.cs

@ -63,7 +63,7 @@ namespace Debugger.Tests { @@ -63,7 +63,7 @@ namespace Debugger.Tests {
Name=""
OldestStackFrame="System.AppDomain.SetupDomain"
Priority="Normal"
RuntimeValue=" = null" />
RuntimeValue="null" />
</ThreadStartedEvent>
<ModuleLoaded>Thread_Name.exe (Has symbols)</ModuleLoaded>
<DebuggingPaused>Break Thread_Name.cs:17,4-17,40</DebuggingPaused>
@ -77,7 +77,7 @@ namespace Debugger.Tests { @@ -77,7 +77,7 @@ namespace Debugger.Tests {
Name=""
OldestStackFrame="Debugger.Tests.TestPrograms.Thread_Name.Main"
Priority="AboveNormal"
RuntimeValue=" = {System.Threading.Thread}"
RuntimeValue="{System.Threading.Thread}"
SelectedStackFrame="Debugger.Tests.TestPrograms.Thread_Name.Main" />
</Thread>
<DebuggingPaused>Break Thread_Name.cs:19,4-19,40</DebuggingPaused>
@ -91,7 +91,7 @@ namespace Debugger.Tests { @@ -91,7 +91,7 @@ namespace Debugger.Tests {
Name="ThreadName"
OldestStackFrame="Debugger.Tests.TestPrograms.Thread_Name.Main"
Priority="AboveNormal"
RuntimeValue=" = {System.Threading.Thread}"
RuntimeValue="{System.Threading.Thread}"
SelectedStackFrame="Debugger.Tests.TestPrograms.Thread_Name.Main" />
</Thread>
<ThreadStartedEvent>
@ -103,7 +103,7 @@ namespace Debugger.Tests { @@ -103,7 +103,7 @@ namespace Debugger.Tests {
Name=""
OldestStackFrame="System.Threading.ReaderWriterLock.Finalize"
Priority="Normal"
RuntimeValue=" = null" />
RuntimeValue="null" />
</ThreadStartedEvent>
<ProcessExited />
</Test>

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

@ -61,7 +61,6 @@ namespace Debugger.Tests { @@ -61,7 +61,6 @@ namespace Debugger.Tests {
ArrayLength="5"
ArrayRank="1"
AsString="{System.Int32[]}"
Expression="array"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32[]" />
@ -70,35 +69,30 @@ namespace Debugger.Tests { @@ -70,35 +69,30 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="0"
Expression="(array)[(System.Int32)0]"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="1"
Expression="(array)[(System.Int32)1]"
PrimitiveValue="1"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="2"
Expression="(array)[(System.Int32)2]"
PrimitiveValue="2"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="3"
Expression="(array)[(System.Int32)3]"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="4"
Expression="(array)[(System.Int32)4]"
PrimitiveValue="4"
Type="System.Int32" />
</Item>
@ -135,7 +129,6 @@ namespace Debugger.Tests { @@ -135,7 +129,6 @@ namespace Debugger.Tests {
<array.Length>
<Value
AsString="5"
Expression="((System.Array)(array)).Length"
PrimitiveValue="5"
Type="System.Int32" />
</array.Length>

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

@ -55,7 +55,6 @@ namespace Debugger.Tests { @@ -55,7 +55,6 @@ namespace Debugger.Tests {
<dict>
<Value
AsString="{System.Collections.Generic.Dictionary&lt;System.String,System.Int32&gt;}"
Expression="dict"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Collections.Generic.Dictionary&lt;System.String,System.Int32&gt;" />
@ -67,7 +66,6 @@ namespace Debugger.Tests { @@ -67,7 +66,6 @@ namespace Debugger.Tests {
ArrayLength="3"
ArrayRank="1"
AsString="{System.Int32[]}"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).buckets"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Int32[]" />
@ -78,7 +76,6 @@ namespace Debugger.Tests { @@ -78,7 +76,6 @@ namespace Debugger.Tests {
ArrayLength="3"
ArrayRank="1"
AsString="{Entry&lt;System.String,System.Int32&gt;[]}"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).entries"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Entry&lt;System.String,System.Int32&gt;[]" />
@ -86,35 +83,30 @@ namespace Debugger.Tests { @@ -86,35 +83,30 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="3"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).count"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="3"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).version"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="-1"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).freeList"
PrimitiveValue="-1"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="0"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).freeCount"
PrimitiveValue="0"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="{System.Collections.Generic.GenericEqualityComparer&lt;System.String&gt;}"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).comparer"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Collections.Generic.GenericEqualityComparer&lt;System.String&gt;" />
@ -122,7 +114,6 @@ namespace Debugger.Tests { @@ -122,7 +114,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="null"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).keys"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
@ -131,7 +122,6 @@ namespace Debugger.Tests { @@ -131,7 +122,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="null"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).values"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
@ -140,7 +130,6 @@ namespace Debugger.Tests { @@ -140,7 +130,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="null"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict))._syncRoot"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
@ -149,7 +138,6 @@ namespace Debugger.Tests { @@ -149,7 +138,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="null"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).m_siInfo"
IsNull="True"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
@ -158,7 +146,6 @@ namespace Debugger.Tests { @@ -158,7 +146,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="{System.Collections.Generic.GenericEqualityComparer&lt;System.String&gt;}"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).Comparer"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="System.Collections.Generic.GenericEqualityComparer&lt;System.String&gt;" />
@ -166,14 +153,12 @@ namespace Debugger.Tests { @@ -166,14 +153,12 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="3"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).Count"
PrimitiveValue="3"
Type="System.Int32" />
</Item>
<Item>
<Value
AsString="{KeyCollection&lt;System.String,System.Int32&gt;}"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).Keys"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="KeyCollection&lt;System.String,System.Int32&gt;" />
@ -181,7 +166,6 @@ namespace Debugger.Tests { @@ -181,7 +166,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="{ValueCollection&lt;System.String,System.Int32&gt;}"
Expression="((System.Collections.Generic.Dictionary&lt;System.String, System.Int32&gt;)(dict)).Values"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="ValueCollection&lt;System.String,System.Int32&gt;" />

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

@ -76,7 +76,6 @@ namespace Debugger.Tests { @@ -76,7 +76,6 @@ namespace Debugger.Tests {
<val>
<Value
AsString="{Debugger.Tests.TestPrograms.Value_Object}"
Expression="val"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Debugger.Tests.TestPrograms.Value_Object" />
@ -85,7 +84,6 @@ namespace Debugger.Tests { @@ -85,7 +84,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="c"
Expression="((Debugger.Tests.TestPrograms.Value_Object)(val)).privateField"
IsReference="True"
PrimitiveValue="c"
Type="System.String" />
@ -93,7 +91,6 @@ namespace Debugger.Tests { @@ -93,7 +91,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="d"
Expression="((Debugger.Tests.TestPrograms.Value_Object)(val)).publicFiled"
IsReference="True"
PrimitiveValue="d"
Type="System.String" />
@ -101,7 +98,6 @@ namespace Debugger.Tests { @@ -101,7 +98,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="a"
Expression="((Debugger.Tests.TestPrograms.BaseClass2)(val)).basePublic"
IsReference="True"
PrimitiveValue="a"
Type="System.String" />
@ -109,7 +105,6 @@ namespace Debugger.Tests { @@ -109,7 +105,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="b"
Expression="((Debugger.Tests.TestPrograms.BaseClass2)(val)).basePrivate"
IsReference="True"
PrimitiveValue="b"
Type="System.String" />
@ -117,7 +112,6 @@ namespace Debugger.Tests { @@ -117,7 +112,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="c"
Expression="((Debugger.Tests.TestPrograms.Value_Object)(val)).PublicProperty"
IsReference="True"
PrimitiveValue="c"
Type="System.String" />
@ -127,7 +121,6 @@ namespace Debugger.Tests { @@ -127,7 +121,6 @@ namespace Debugger.Tests {
<val>
<Value
AsString="{Debugger.Tests.TestPrograms.Value_Object}"
Expression="val"
IsReference="True"
PrimitiveValue="{Exception: Value is not a primitive type}"
Type="Debugger.Tests.TestPrograms.Value_Object" />
@ -136,7 +129,6 @@ namespace Debugger.Tests { @@ -136,7 +129,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="new private"
Expression="((Debugger.Tests.TestPrograms.Value_Object)(val)).privateField"
IsReference="True"
PrimitiveValue="new private"
Type="System.String" />
@ -144,7 +136,6 @@ namespace Debugger.Tests { @@ -144,7 +136,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="d"
Expression="((Debugger.Tests.TestPrograms.Value_Object)(val)).publicFiled"
IsReference="True"
PrimitiveValue="d"
Type="System.String" />
@ -152,7 +143,6 @@ namespace Debugger.Tests { @@ -152,7 +143,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="a"
Expression="((Debugger.Tests.TestPrograms.BaseClass2)(val)).basePublic"
IsReference="True"
PrimitiveValue="a"
Type="System.String" />
@ -160,7 +150,6 @@ namespace Debugger.Tests { @@ -160,7 +150,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="b"
Expression="((Debugger.Tests.TestPrograms.BaseClass2)(val)).basePrivate"
IsReference="True"
PrimitiveValue="b"
Type="System.String" />
@ -168,7 +157,6 @@ namespace Debugger.Tests { @@ -168,7 +157,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="new private"
Expression="((Debugger.Tests.TestPrograms.Value_Object)(val)).PublicProperty"
IsReference="True"
PrimitiveValue="new private"
Type="System.String" />

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

@ -62,7 +62,6 @@ namespace Debugger.Tests { @@ -62,7 +62,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="True"
Expression="b"
PrimitiveValue="True"
Type="System.Boolean">
<Type>
@ -88,7 +87,6 @@ namespace Debugger.Tests { @@ -88,7 +87,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="5"
Expression="i"
PrimitiveValue="5"
Type="System.Int32">
<Type>
@ -114,7 +112,6 @@ namespace Debugger.Tests { @@ -114,7 +112,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="five"
Expression="s"
IsReference="True"
PrimitiveValue="five"
Type="System.String">
@ -141,7 +138,6 @@ namespace Debugger.Tests { @@ -141,7 +138,6 @@ namespace Debugger.Tests {
<Item>
<Value
AsString="5.5"
Expression="d"
PrimitiveValue="5.5"
Type="System.Double">
<Type>

Loading…
Cancel
Save