Author: martin
Date: 2008-01-23 04:54:04 -0500 (Wed, 23 Jan 2008)
New Revision: 93634
Modified:
branches/martin/debugger-terrania/debugger/ChangeLog
branches/martin/debugger-terrania/debugger/backend/arch/DwarfReader.cs
branches/martin/debugger-terrania/debugger/classes/Method.cs
branches/martin/debugger-terrania/debugger/frontend/Expression.cs
branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs
branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs
Log:
2008-01-23 Martin Baulig <[EMAIL PROTECTED]>
* classes/Method.cs
(Method.GetDeclaringType): Return a `TargetStructType' instead of
a `TargetClassType'.
Modified: branches/martin/debugger-terrania/debugger/ChangeLog
===================================================================
--- branches/martin/debugger-terrania/debugger/ChangeLog 2008-01-23
09:41:40 UTC (rev 93633)
+++ branches/martin/debugger-terrania/debugger/ChangeLog 2008-01-23
09:54:04 UTC (rev 93634)
@@ -1,5 +1,11 @@
2008-01-23 Martin Baulig <[EMAIL PROTECTED]>
+ * classes/Method.cs
+ (Method.GetDeclaringType): Return a `TargetStructType' instead of
+ a `TargetClassType'.
+
+2008-01-23 Martin Baulig <[EMAIL PROTECTED]>
+
* test/{testsuite|src}/TestSimpleGenerics.cs: New test.
2008-01-19 Martin Baulig <[EMAIL PROTECTED]>
Modified: branches/martin/debugger-terrania/debugger/backend/arch/DwarfReader.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/backend/arch/DwarfReader.cs
2008-01-23 09:41:40 UTC (rev 93633)
+++ branches/martin/debugger-terrania/debugger/backend/arch/DwarfReader.cs
2008-01-23 09:54:04 UTC (rev 93634)
@@ -2519,7 +2519,7 @@
get { return -1; }
}
- public override TargetClassType GetDeclaringType
(Thread target)
+ public override TargetStructType GetDeclaringType
(Thread target)
{
return null;
}
Modified: branches/martin/debugger-terrania/debugger/classes/Method.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/classes/Method.cs
2008-01-23 09:41:40 UTC (rev 93633)
+++ branches/martin/debugger-terrania/debugger/classes/Method.cs
2008-01-23 09:54:04 UTC (rev 93634)
@@ -262,7 +262,7 @@
return true;
}
- public abstract TargetClassType GetDeclaringType (Thread
target);
+ public abstract TargetStructType GetDeclaringType (Thread
target);
public abstract bool HasThis {
get;
Modified: branches/martin/debugger-terrania/debugger/frontend/Expression.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/frontend/Expression.cs
2008-01-23 09:41:40 UTC (rev 93633)
+++ branches/martin/debugger-terrania/debugger/frontend/Expression.cs
2008-01-23 09:54:04 UTC (rev 93634)
@@ -895,7 +895,7 @@
if (method == null)
return null;
- TargetClassType decl_type = method.GetDeclaringType
(context.CurrentThread);
+ TargetStructType decl_type = method.GetDeclaringType
(context.CurrentThread);
if (decl_type == null)
return null;
Modified:
branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs
===================================================================
--- branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs
2008-01-23 09:41:40 UTC (rev 93633)
+++ branches/martin/debugger-terrania/debugger/languages/mono/MonoSymbolFile.cs
2008-01-23 09:54:04 UTC (rev 93634)
@@ -932,7 +932,7 @@
MethodSource source;
C.MethodEntry method;
Cecil.MethodDefinition mdef;
- TargetClassType decl_type;
+ TargetStructType decl_type;
TargetVariable this_var;
TargetVariable[] parameters;
TargetVariable[] locals;
@@ -991,7 +991,11 @@
TargetAddress decl_klass =
mono.MonoRuntime.MonoMethodGetClass (
memory, address.MonoMethod);
- decl_type = mono.ReadMonoClass (memory,
decl_klass).ClassType;
+ TargetType decl = mono.ReadMonoClass (memory,
decl_klass);
+ if (decl.HasClassType)
+ decl_type = decl.ClassType;
+ else
+ decl_type = (TargetStructType) decl;
Cecil.ParameterDefinitionCollection param_info
= mdef.Parameters;
parameters = new TargetVariable
[param_info.Count];
@@ -1063,7 +1067,7 @@
return locals;
}
- public override TargetClassType GetDeclaringType
(Thread target)
+ public override TargetStructType GetDeclaringType
(Thread target)
{
read_variables (target);
return decl_type;
@@ -1567,7 +1571,7 @@
get { return source; }
}
- public override TargetClassType GetDeclaringType
(Thread target)
+ public override TargetStructType GetDeclaringType
(Thread target)
{
return null;
}
Modified:
branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs
===================================================================
---
branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs
2008-01-23 09:41:40 UTC (rev 93633)
+++
branches/martin/debugger-terrania/debugger/test/testsuite/TestSimpleGenerics.cs
2008-01-23 09:54:04 UTC (rev 93634)
@@ -52,6 +52,11 @@
// FIXME: Use correct method name
AssertStopped (thread, "Foo`1.Hello()", LineFooHello);
+ AssertPrint (thread, "this", "(Foo`1<int>) { Data = 5
}");
+ AssertType (thread, "this",
+ "class Foo`1<int> = Foo`1<T> :
System.Object\n" +
+ "{\n T Data;\n void Hello ();\n .ctor
(T);\n}");
+
AssertExecute ("continue");
AssertTargetOutput ("5");
AssertHitBreakpoint (thread, bpt_main_2, "X.Main()",
LineMain2);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches