Browse Source

Fixed access to members of base class

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2279 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 19 years ago
parent
commit
4681b50e41
  1. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Types/DebugType.cs
  2. 1
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Debugger.Tests.csproj
  3. 9
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs
  4. 27
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs
  5. 11
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.xml
  6. 3
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs
  7. 108
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.xml

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Types/DebugType.cs

@ -211,7 +211,7 @@ namespace Debugger
get { get {
ICorDebugType baseType = corType.Base; ICorDebugType baseType = corType.Base;
if (baseType != null) { if (baseType != null) {
return new DebugType(process, baseType); return Create(process, baseType);
} else { } else {
return null; return null;
} }

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

@ -41,6 +41,7 @@
<Compile Include="Src\DebuggerTests.cs" /> <Compile Include="Src\DebuggerTests.cs" />
<Compile Include="Src\DebuggerTestsBase.cs" /> <Compile Include="Src\DebuggerTestsBase.cs" />
<Compile Include="Src\TestPrograms\Exception.cs" /> <Compile Include="Src\TestPrograms\Exception.cs" />
<Compile Include="Src\TestPrograms\ExceptionCustom.cs" />
<Compile Include="Src\TestPrograms\GenericDictionary.cs" /> <Compile Include="Src\TestPrograms\GenericDictionary.cs" />
<EmbeddedResource Include="Src\TestPrograms\*.cs" /> <EmbeddedResource Include="Src\TestPrograms\*.cs" />
<EmbeddedResource Include="Src\TestPrograms\*.xml" /> <EmbeddedResource Include="Src\TestPrograms\*.xml" />

9
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTests.cs

@ -398,5 +398,14 @@ namespace Debugger.Tests
process.Continue(); process.Continue();
process.WaitForExit(); process.WaitForExit();
} }
[Test]
public void ExceptionCustom()
{
StartTest("ExceptionCustom");
WaitForPause(PausedReason.Exception, null);
process.Continue();
process.WaitForExit();
}
} }
} }

27
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs

@ -0,0 +1,27 @@
// <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
{
class MyException: System.Exception
{
public MyException(string msg) : base (msg)
{
}
}
public class ExceptionCustom
{
public static void Main()
{
throw new MyException("test");
}
}
}

11
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<DebuggerTests>
<Test name="ExceptionCustom">
<ProcessStarted />
<ModuleLoaded symbols="False">mscorlib.dll</ModuleLoaded>
<ModuleLoaded symbols="True">ExceptionCustom.exe</ModuleLoaded>
<DebuggingPaused>Exception</DebuggingPaused>
<ExceptionThrown>test</ExceptionThrown>
<ProcessExited />
</Test>
</DebuggerTests>

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

@ -11,7 +11,8 @@ namespace Debugger.Tests.TestPrograms
{ {
public class BaseClass public class BaseClass
{ {
public string basePublic = "a";
string basePrivate = "b";
} }
public class ObjectValue: BaseClass public class ObjectValue: BaseClass

108
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.xml

@ -24,7 +24,7 @@
</ObjectDump> </ObjectDump>
<ObjectDump name="val members"> <ObjectDump name="val members">
<NamedValueCollection> <NamedValueCollection>
<Count>3</Count> <Count>5</Count>
<Items> <Items>
<MemberValue> <MemberValue>
<MemberInfo> <MemberInfo>
@ -103,6 +103,58 @@
<HasExpired>False</HasExpired> <HasExpired>False</HasExpired>
<Type>System.String</Type> <Type>System.String</Type>
</MemberValue> </MemberValue>
<MemberValue>
<MemberInfo>
<FieldInfo>
<IsLiteral>False</IsLiteral>
<IsPrivate>False</IsPrivate>
<IsPublic>True</IsPublic>
<IsStatic>False</IsStatic>
<Name>basePublic</Name>
<DeclaringType>Debugger.Tests.TestPrograms.BaseClass</DeclaringType>
<Module>ObjectValue.exe</Module>
</FieldInfo>
</MemberInfo>
<Name>basePublic</Name>
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsNull>False</IsNull>
<AsString>a</AsString>
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>a</PrimitiveValue>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</MemberValue>
<MemberValue>
<MemberInfo>
<FieldInfo>
<IsLiteral>False</IsLiteral>
<IsPrivate>True</IsPrivate>
<IsPublic>False</IsPublic>
<IsStatic>False</IsStatic>
<Name>basePrivate</Name>
<DeclaringType>Debugger.Tests.TestPrograms.BaseClass</DeclaringType>
<Module>ObjectValue.exe</Module>
</FieldInfo>
</MemberInfo>
<Name>basePrivate</Name>
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsNull>False</IsNull>
<AsString>b</AsString>
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>b</PrimitiveValue>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</MemberValue>
</Items> </Items>
</NamedValueCollection> </NamedValueCollection>
</ObjectDump> </ObjectDump>
@ -127,7 +179,7 @@
</ObjectDump> </ObjectDump>
<ObjectDump name="val members"> <ObjectDump name="val members">
<NamedValueCollection> <NamedValueCollection>
<Count>3</Count> <Count>5</Count>
<Items> <Items>
<MemberValue> <MemberValue>
<MemberInfo> <MemberInfo>
@ -206,6 +258,58 @@
<HasExpired>False</HasExpired> <HasExpired>False</HasExpired>
<Type>System.String</Type> <Type>System.String</Type>
</MemberValue> </MemberValue>
<MemberValue>
<MemberInfo>
<FieldInfo>
<IsLiteral>False</IsLiteral>
<IsPrivate>False</IsPrivate>
<IsPublic>True</IsPublic>
<IsStatic>False</IsStatic>
<Name>basePublic</Name>
<DeclaringType>Debugger.Tests.TestPrograms.BaseClass</DeclaringType>
<Module>ObjectValue.exe</Module>
</FieldInfo>
</MemberInfo>
<Name>basePublic</Name>
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsNull>False</IsNull>
<AsString>a</AsString>
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>a</PrimitiveValue>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</MemberValue>
<MemberValue>
<MemberInfo>
<FieldInfo>
<IsLiteral>False</IsLiteral>
<IsPrivate>True</IsPrivate>
<IsPublic>False</IsPublic>
<IsStatic>False</IsStatic>
<Name>basePrivate</Name>
<DeclaringType>Debugger.Tests.TestPrograms.BaseClass</DeclaringType>
<Module>ObjectValue.exe</Module>
</FieldInfo>
</MemberInfo>
<Name>basePrivate</Name>
<IsArray>False</IsArray>
<ArrayLenght exception="Value is not an array" />
<ArrayRank exception="Value is not an array" />
<ArrayDimensions exception="Value is not an array" />
<IsNull>False</IsNull>
<AsString>b</AsString>
<IsObject>False</IsObject>
<IsPrimitive>True</IsPrimitive>
<IsInteger>False</IsInteger>
<PrimitiveValue>b</PrimitiveValue>
<HasExpired>False</HasExpired>
<Type>System.String</Type>
</MemberValue>
</Items> </Items>
</NamedValueCollection> </NamedValueCollection>
</ObjectDump> </ObjectDump>

Loading…
Cancel
Save