Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4871 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
6 changed files with 625 additions and 1833 deletions
File diff suppressed because it is too large
Load Diff
@ -1,440 +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>
|
|
||||||
|
|
||||||
// Never used field
|
|
||||||
#pragma warning disable 0169
|
|
||||||
// Field will always have default value
|
|
||||||
#pragma warning disable 0649
|
|
||||||
|
|
||||||
using System; |
|
||||||
|
|
||||||
namespace Debugger.Tests.TestPrograms |
|
||||||
{ |
|
||||||
public class DebugType_Access |
|
||||||
{ |
|
||||||
private int privateField; |
|
||||||
public int publicField; |
|
||||||
protected int protectedField; |
|
||||||
internal int internalField; |
|
||||||
static int staticField; |
|
||||||
|
|
||||||
private int privateProperty { get { return 0; } } |
|
||||||
public int publicProperty { get { return 0; } } |
|
||||||
protected int protectedProperty { get { return 0; } } |
|
||||||
internal int internalProperty { get { return 0; } } |
|
||||||
static int staticProperty { get { return 0; } } |
|
||||||
|
|
||||||
private void privateMethod() {} |
|
||||||
public void publicMethod() {} |
|
||||||
protected void protectedMethod() {} |
|
||||||
internal void internalMethod() {} |
|
||||||
static void staticMethod() {} |
|
||||||
|
|
||||||
public static void Main() |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public class Metadata2 {} |
|
||||||
public class Metadata3 {} |
|
||||||
public class Metadata4 {} |
|
||||||
public class Metadata5 {} |
|
||||||
public class Metadata6 {} |
|
||||||
public class Metadata7 {} |
|
||||||
} |
|
||||||
|
|
||||||
#if TEST_CODE
|
|
||||||
namespace Debugger.Tests { |
|
||||||
using Debugger.MetaData; |
|
||||||
|
|
||||||
public partial class DebuggerTests |
|
||||||
{ |
|
||||||
[NUnit.Framework.Test] |
|
||||||
public void DebugType_Access() |
|
||||||
{ |
|
||||||
StartTest("DebugType_Access.cs"); |
|
||||||
|
|
||||||
process.Options.StepOverSingleLineProperties = false; |
|
||||||
process.Options.StepOverFieldAccessProperties = true; |
|
||||||
|
|
||||||
ObjectDump("Members", process.SelectedStackFrame.MethodInfo.DeclaringType.GetMembers(BindingFlags.All)); |
|
||||||
ObjectDump("Types", process.SelectedStackFrame.MethodInfo.Module.GetNamesOfDefinedTypes()); |
|
||||||
|
|
||||||
EndTest(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
#endif
|
|
||||||
|
|
||||||
#if EXPECTED_OUTPUT
|
|
||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<DebuggerTests> |
|
||||||
<Test |
|
||||||
name="DebugType_Access.cs"> |
|
||||||
<ProcessStarted /> |
|
||||||
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded> |
|
||||||
<ModuleLoaded>DebugType_Access.exe (Has symbols)</ModuleLoaded> |
|
||||||
<DebuggingPaused>Break DebugType_Access.cs:39,4-39,40</DebuggingPaused> |
|
||||||
<Members |
|
||||||
Capacity="64" |
|
||||||
Count="34"> |
|
||||||
<Item> |
|
||||||
<FieldInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.privateField" |
|
||||||
IsPrivate="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="privateField" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<FieldInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.publicField" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="publicField" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<FieldInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.protectedField" |
|
||||||
IsProtected="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="protectedField" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<FieldInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.internalField" |
|
||||||
IsInternal="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="internalField" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<FieldInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.staticField" |
|
||||||
IsPrivate="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="staticField" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.get_privateProperty" |
|
||||||
IsPrivate="True" |
|
||||||
IsSpecialName="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="get_privateProperty" |
|
||||||
ReturnType="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.get_publicProperty" |
|
||||||
IsPublic="True" |
|
||||||
IsSpecialName="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="get_publicProperty" |
|
||||||
ReturnType="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.get_protectedProperty" |
|
||||||
IsProtected="True" |
|
||||||
IsSpecialName="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="get_protectedProperty" |
|
||||||
ReturnType="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.get_internalProperty" |
|
||||||
IsInternal="True" |
|
||||||
IsSpecialName="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="get_internalProperty" |
|
||||||
ReturnType="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.get_staticProperty" |
|
||||||
IsPrivate="True" |
|
||||||
IsSpecialName="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="get_staticProperty" |
|
||||||
ReturnType="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.privateMethod" |
|
||||||
IsPrivate="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="privateMethod" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.publicMethod" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="publicMethod" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.protectedMethod" |
|
||||||
IsProtected="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="protectedMethod" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.internalMethod" |
|
||||||
IsInternal="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="internalMethod" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.staticMethod" |
|
||||||
IsPrivate="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="staticMethod" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.Main" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="Main" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access..ctor" |
|
||||||
IsPublic="True" |
|
||||||
IsSpecialName="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name=".ctor" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<PropertyInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.privateProperty" |
|
||||||
GetMethod="get_privateProperty" |
|
||||||
IsPrivate="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="privateProperty" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<PropertyInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.publicProperty" |
|
||||||
GetMethod="get_publicProperty" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="publicProperty" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<PropertyInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.protectedProperty" |
|
||||||
GetMethod="get_protectedProperty" |
|
||||||
IsProtected="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="protectedProperty" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<PropertyInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.internalProperty" |
|
||||||
GetMethod="get_internalProperty" |
|
||||||
IsInternal="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="internalProperty" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<PropertyInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.DebugType_Access" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DebugType_Access.staticProperty" |
|
||||||
GetMethod="get_staticProperty" |
|
||||||
IsPrivate="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Access.exe" |
|
||||||
Name="staticProperty" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object..ctor" |
|
||||||
IsPublic="True" |
|
||||||
IsSpecialName="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name=".ctor" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.ToString" |
|
||||||
IsPublic="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="ToString" |
|
||||||
ReturnType="System.String" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.Equals" |
|
||||||
IsPublic="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="Equals" |
|
||||||
ParameterCount="1" |
|
||||||
ParameterTypes="{System.Object}" |
|
||||||
ReturnType="System.Boolean" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.Equals" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="Equals" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Object, System.Object}" |
|
||||||
ReturnType="System.Boolean" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.ReferenceEquals" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="ReferenceEquals" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Object, System.Object}" |
|
||||||
ReturnType="System.Boolean" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.GetHashCode" |
|
||||||
IsPublic="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="GetHashCode" |
|
||||||
ReturnType="System.Int32" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.GetType" |
|
||||||
IsPublic="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="GetType" |
|
||||||
ReturnType="System.Type" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.Finalize" |
|
||||||
IsProtected="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="Finalize" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.MemberwiseClone" |
|
||||||
IsProtected="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="MemberwiseClone" |
|
||||||
ReturnType="System.Object" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.FieldSetter" |
|
||||||
IsPrivate="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="FieldSetter" |
|
||||||
ParameterCount="3" |
|
||||||
ParameterTypes="{System.String, System.String, System.Object}" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.FieldGetter" |
|
||||||
IsPrivate="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="FieldGetter" |
|
||||||
ParameterCount="3" |
|
||||||
ParameterTypes="{System.String, System.String, System.Object}" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="System.Object" |
|
||||||
FullName="System.Object.GetFieldInfo" |
|
||||||
IsPrivate="True" |
|
||||||
Module="mscorlib.dll" |
|
||||||
Name="GetFieldInfo" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.String, System.String}" |
|
||||||
ReturnType="System.Reflection.FieldInfo" |
|
||||||
StepOver="True" /> |
|
||||||
</Item> |
|
||||||
</Members> |
|
||||||
<Types |
|
||||||
Capacity="8" |
|
||||||
Count="7"> |
|
||||||
<Item>Debugger.Tests.TestPrograms.DebugType_Access</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.Metadata2</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.Metadata3</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.Metadata4</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.Metadata5</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.Metadata6</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.Metadata7</Item> |
|
||||||
</Types> |
|
||||||
<ProcessExited /> |
|
||||||
</Test> |
|
||||||
</DebuggerTests> |
|
||||||
#endif // EXPECTED_OUTPUT
|
|
||||||
@ -1,88 +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; |
|
||||||
|
|
||||||
namespace Debugger.Tests.TestPrograms |
|
||||||
{ |
|
||||||
public class DefinedTypes_Class |
|
||||||
{ |
|
||||||
public static void Main() |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public struct DefinedTypes_Struct |
|
||||||
{ |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public class DefinedTypes_GenericClass<K, V> |
|
||||||
{ |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
#if TEST_CODE
|
|
||||||
namespace Debugger.Tests { |
|
||||||
public partial class DebuggerTests |
|
||||||
{ |
|
||||||
[NUnit.Framework.Test] |
|
||||||
public void DebugType_DefinedTypes() |
|
||||||
{ |
|
||||||
StartTest("DebugType_DefinedTypes.cs"); |
|
||||||
|
|
||||||
ObjectDump("TypesAsString", process.Modules["DebugType_DefinedTypes.exe"].GetNamesOfDefinedTypes()); |
|
||||||
ObjectDump("Types", process.Modules["DebugType_DefinedTypes.exe"].GetDefinedTypes()); |
|
||||||
|
|
||||||
EndTest(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
#endif
|
|
||||||
|
|
||||||
#if EXPECTED_OUTPUT
|
|
||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<DebuggerTests> |
|
||||||
<Test |
|
||||||
name="DebugType_DefinedTypes.cs"> |
|
||||||
<ProcessStarted /> |
|
||||||
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded> |
|
||||||
<ModuleLoaded>DebugType_DefinedTypes.exe (Has symbols)</ModuleLoaded> |
|
||||||
<DebuggingPaused>Break DebugType_DefinedTypes.cs:16,4-16,40</DebuggingPaused> |
|
||||||
<TypesAsString |
|
||||||
Capacity="4" |
|
||||||
Count="3"> |
|
||||||
<Item>Debugger.Tests.TestPrograms.DefinedTypes_Class</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.DefinedTypes_Struct</Item> |
|
||||||
<Item>Debugger.Tests.TestPrograms.DefinedTypes_GenericClass`2</Item> |
|
||||||
</TypesAsString> |
|
||||||
<Types |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<DebugType |
|
||||||
BaseType="System.Object" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DefinedTypes_Class" |
|
||||||
Kind="Class" |
|
||||||
Module="DebugType_DefinedTypes.exe" |
|
||||||
Name="DefinedTypes_Class" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<DebugType |
|
||||||
BaseType="System.ValueType" |
|
||||||
FullName="Debugger.Tests.TestPrograms.DefinedTypes_Struct" |
|
||||||
Kind="ValueType" |
|
||||||
Module="DebugType_DefinedTypes.exe" |
|
||||||
Name="DefinedTypes_Struct" /> |
|
||||||
</Item> |
|
||||||
</Types> |
|
||||||
<ProcessExited /> |
|
||||||
</Test> |
|
||||||
</DebuggerTests> |
|
||||||
#endif // EXPECTED_OUTPUT
|
|
||||||
@ -1,564 +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; |
|
||||||
|
|
||||||
namespace Debugger.Tests.TestPrograms |
|
||||||
{ |
|
||||||
public class MainClass |
|
||||||
{ |
|
||||||
public static void Main() |
|
||||||
{ |
|
||||||
GenericClass<int, string> gClass = new GenericClass<int, string>(); |
|
||||||
gClass.Metod(1, "1!"); |
|
||||||
gClass.GenericMethod<bool>(2, "2!"); |
|
||||||
GenericClass<int, string>.StaticMetod(3, "3!"); |
|
||||||
GenericClass<int, string>.StaticGenericMethod<bool>(4, "4!"); |
|
||||||
|
|
||||||
GenericStruct<int, string> gStruct = new GenericStruct<int, string>(); |
|
||||||
gStruct.Metod(5, "5!"); |
|
||||||
gStruct.GenericMethod<bool>(6, "6!"); |
|
||||||
GenericStruct<int, string>.StaticMetod(7, "7!"); |
|
||||||
GenericStruct<int, string>.StaticGenericMethod<bool>(8, "8!"); |
|
||||||
|
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public class GenericClass<V, K> |
|
||||||
{ |
|
||||||
public V Prop { |
|
||||||
get { |
|
||||||
return default(V); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public static V StaticProp { |
|
||||||
get { |
|
||||||
return default(V); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public K Metod(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return k; |
|
||||||
} |
|
||||||
|
|
||||||
public T GenericMethod<T>(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return default(T); |
|
||||||
} |
|
||||||
|
|
||||||
public static K StaticMetod(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return k; |
|
||||||
} |
|
||||||
|
|
||||||
public static T StaticGenericMethod<T>(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return default(T); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public struct GenericStruct<V, K> |
|
||||||
{ |
|
||||||
public K Metod(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return k; |
|
||||||
} |
|
||||||
|
|
||||||
public T GenericMethod<T>(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return default(T); |
|
||||||
} |
|
||||||
|
|
||||||
public static K StaticMetod(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return k; |
|
||||||
} |
|
||||||
|
|
||||||
public static T StaticGenericMethod<T>(V v, K k) |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
return default(T); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
#if TEST_CODE
|
|
||||||
namespace Debugger.Tests { |
|
||||||
public partial class DebuggerTests |
|
||||||
{ |
|
||||||
[NUnit.Framework.Test] |
|
||||||
public void DebugType_Generics() |
|
||||||
{ |
|
||||||
ExpandProperties( |
|
||||||
"StackFrame.MethodInfo", |
|
||||||
"MemberInfo.DeclaringType" |
|
||||||
); |
|
||||||
StartTest("DebugType_Generics.cs"); |
|
||||||
|
|
||||||
for(int i = 0; i < 8; i++) { |
|
||||||
ObjectDump("SelectedStackFrame", process.SelectedStackFrame); |
|
||||||
ObjectDump("SelectedStackFrame-GetArguments", process.SelectedStackFrame.GetArgumentValues()); |
|
||||||
process.Continue(); |
|
||||||
} |
|
||||||
ObjectDump("Prop", process.SelectedStackFrame.GetLocalVariableValue("gClass").GetMemberValue("Prop")); |
|
||||||
ObjectDump("StaticProp", process.SelectedStackFrame.GetLocalVariableValue("gClass").GetMemberValue("StaticProp")); |
|
||||||
|
|
||||||
EndTest(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
#endif
|
|
||||||
|
|
||||||
#if EXPECTED_OUTPUT
|
|
||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<DebuggerTests> |
|
||||||
<Test |
|
||||||
name="DebugType_Generics.cs"> |
|
||||||
<ProcessStarted /> |
|
||||||
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded> |
|
||||||
<ModuleLoaded>DebugType_Generics.exe (Has symbols)</ModuleLoaded> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:48,4-48,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="Metod" |
|
||||||
NextStatement="DebugType_Generics.cs:48,4-48,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>.Metod" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="Metod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.String"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.Object" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="Class" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericClass<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="1" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="1" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="1!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="1!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:54,4-54,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="GenericMethod" |
|
||||||
NextStatement="DebugType_Generics.cs:54,4-54,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>.GenericMethod" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericMethod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.Object"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.Object" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="Class" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericClass<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="2" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="2" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="2!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="2!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:60,4-60,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="StaticMetod" |
|
||||||
NextStatement="DebugType_Generics.cs:60,4-60,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>.StaticMetod" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="StaticMetod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.String"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.Object" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="Class" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericClass<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="3" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="3" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="3!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="3!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:66,4-66,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="StaticGenericMethod" |
|
||||||
NextStatement="DebugType_Generics.cs:66,4-66,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>.StaticGenericMethod" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="StaticGenericMethod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.Object"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.Object" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericClass<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="Class" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericClass<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="4" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="4" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="4!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="4!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:75,4-75,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="Metod" |
|
||||||
NextStatement="DebugType_Generics.cs:75,4-75,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>.Metod" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="Metod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.String"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.ValueType" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="ValueType" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericStruct<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="5" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="5" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="5!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="5!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:81,4-81,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="GenericMethod" |
|
||||||
NextStatement="DebugType_Generics.cs:81,4-81,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>.GenericMethod" |
|
||||||
IsPublic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericMethod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.Object"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.ValueType" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="ValueType" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericStruct<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="6" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="6" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="6!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="6!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:87,4-87,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="StaticMetod" |
|
||||||
NextStatement="DebugType_Generics.cs:87,4-87,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>.StaticMetod" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="StaticMetod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.String"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.ValueType" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="ValueType" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericStruct<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="7" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="7" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="7!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="7!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:93,4-93,40</DebuggingPaused> |
|
||||||
<SelectedStackFrame> |
|
||||||
<StackFrame |
|
||||||
ArgumentCount="2" |
|
||||||
ChainIndex="1" |
|
||||||
FrameIndex="1" |
|
||||||
HasSymbols="True" |
|
||||||
MethodInfo="StaticGenericMethod" |
|
||||||
NextStatement="DebugType_Generics.cs:93,4-93,40"> |
|
||||||
<MethodInfo> |
|
||||||
<MethodInfo |
|
||||||
DeclaringType="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>.StaticGenericMethod" |
|
||||||
IsPublic="True" |
|
||||||
IsStatic="True" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="StaticGenericMethod" |
|
||||||
ParameterCount="2" |
|
||||||
ParameterTypes="{System.Int32, System.String}" |
|
||||||
ReturnType="System.Object"> |
|
||||||
<DeclaringType> |
|
||||||
<DebugType |
|
||||||
BaseType="System.ValueType" |
|
||||||
FullName="Debugger.Tests.TestPrograms.GenericStruct<System.Int32,System.String>" |
|
||||||
GenericArguments="{System.Int32, System.String}" |
|
||||||
Kind="ValueType" |
|
||||||
Module="DebugType_Generics.exe" |
|
||||||
Name="GenericStruct<Int32,String>" /> |
|
||||||
</DeclaringType> |
|
||||||
</MethodInfo> |
|
||||||
</MethodInfo> |
|
||||||
</StackFrame> |
|
||||||
</SelectedStackFrame> |
|
||||||
<SelectedStackFrame-GetArguments |
|
||||||
Capacity="4" |
|
||||||
Count="2"> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="8" |
|
||||||
Expression="v" |
|
||||||
PrimitiveValue="8" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Item> |
|
||||||
<Item> |
|
||||||
<Value |
|
||||||
AsString="8!" |
|
||||||
Expression="k" |
|
||||||
IsReference="True" |
|
||||||
PrimitiveValue="8!" |
|
||||||
Type="System.String" /> |
|
||||||
</Item> |
|
||||||
</SelectedStackFrame-GetArguments> |
|
||||||
<DebuggingPaused>Break DebugType_Generics.cs:28,4-28,40</DebuggingPaused> |
|
||||||
<Prop> |
|
||||||
<Value |
|
||||||
AsString="0" |
|
||||||
Expression="((Debugger.Tests.TestPrograms.GenericClass<System.Int32, System.String>)(gClass)).Prop" |
|
||||||
PrimitiveValue="0" |
|
||||||
Type="System.Int32" /> |
|
||||||
</Prop> |
|
||||||
<StaticProp> |
|
||||||
<Value |
|
||||||
AsString="0" |
|
||||||
Expression="Debugger.Tests.TestPrograms.GenericClass<System.Int32, System.String>.StaticProp" |
|
||||||
PrimitiveValue="0" |
|
||||||
Type="System.Int32" /> |
|
||||||
</StaticProp> |
|
||||||
<ProcessExited /> |
|
||||||
</Test> |
|
||||||
</DebuggerTests> |
|
||||||
#endif // EXPECTED_OUTPUT
|
|
||||||
@ -1,65 +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; |
|
||||||
|
|
||||||
namespace Debugger.Tests.TestPrograms |
|
||||||
{ |
|
||||||
public class DebugType_Identity |
|
||||||
{ |
|
||||||
public static void Main() |
|
||||||
{ |
|
||||||
new DebugType_Identity().Func(); |
|
||||||
} |
|
||||||
|
|
||||||
public void Func() |
|
||||||
{ |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
System.Diagnostics.Debugger.Break(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
#if TEST_CODE
|
|
||||||
namespace Debugger.Tests { |
|
||||||
using NUnit.Framework; |
|
||||||
using Debugger.MetaData; |
|
||||||
|
|
||||||
public partial class DebuggerTests |
|
||||||
{ |
|
||||||
[NUnit.Framework.Test] |
|
||||||
public void DebugType_Identity() |
|
||||||
{ |
|
||||||
StartTest("DebugType_Identity.cs"); |
|
||||||
|
|
||||||
DebugType type = process.SelectedStackFrame.GetThisValue().Type; |
|
||||||
MethodInfo mainMethod = process.SelectedStackFrame.MethodInfo; |
|
||||||
process.Continue(); |
|
||||||
|
|
||||||
Assert.AreEqual(type, process.SelectedStackFrame.GetThisValue().Type); |
|
||||||
Assert.AreEqual(mainMethod, process.SelectedStackFrame.MethodInfo); |
|
||||||
|
|
||||||
EndTest(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
#endif
|
|
||||||
|
|
||||||
#if EXPECTED_OUTPUT
|
|
||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<DebuggerTests> |
|
||||||
<Test |
|
||||||
name="DebugType_Identity.cs"> |
|
||||||
<ProcessStarted /> |
|
||||||
<ModuleLoaded>mscorlib.dll (No symbols)</ModuleLoaded> |
|
||||||
<ModuleLoaded>DebugType_Identity.exe (Has symbols)</ModuleLoaded> |
|
||||||
<DebuggingPaused>Break DebugType_Identity.cs:21,4-21,40</DebuggingPaused> |
|
||||||
<DebuggingPaused>Break DebugType_Identity.cs:22,4-22,40</DebuggingPaused> |
|
||||||
<ProcessExited /> |
|
||||||
</Test> |
|
||||||
</DebuggerTests> |
|
||||||
#endif // EXPECTED_OUTPUT
|
|
||||||
Loading…
Reference in new issue