Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2009-09-22 22:41:22 +0400
committerLluis Sanchez <lluis@novell.com>2009-09-22 22:41:22 +0400
commit3e12615119bcd164b29694b6698dbd51710d55a3 (patch)
tree5d45c7a119f7fea5431fb195793ce4084abda775 /extras/MonoDevelop.Debugger.Mdb
parent1c1cca7af6c72c45515af501bdfe11e171840b37 (diff)
* Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs: Add support
for DebuggerTypeProxyAttribute, DebuggerBrowsable and DebuggerDisplayAttribute. svn path=/trunk/monodevelop/; revision=142431
Diffstat (limited to 'extras/MonoDevelop.Debugger.Mdb')
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog6
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs25
2 files changed, 30 insertions, 1 deletions
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog
index 5b333c28b6..df2d8ded1c 100644
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog
+++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog
@@ -1,5 +1,11 @@
2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
+ * MdbObjectValueAdaptor.cs: Add support for
+ DebuggerTypeProxyAttribute, DebuggerBrowsable and
+ DebuggerDisplayAttribute.
+
+2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
+
* MdbObjectValueAdaptor.cs: Add support for examining nested
types.
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs
index 2baa220f11..9224fa141a 100644
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs
+++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs
@@ -30,6 +30,7 @@ using System.Collections;
using ST = System.Threading;
using System.Reflection;
using System.Collections.Generic;
+using System.Diagnostics;
using Mono.Debugging.Evaluation;
using Mono.Debugger.Languages;
using Mono.Debugger;
@@ -178,8 +179,30 @@ namespace DebuggerServer
return CallStaticMethod (ctx, methodName, (TargetType) targetType, lst);
}
- protected override TypeDisplayData OnGetTypeDisplayData (EvaluationContext ctx, object type)
+ protected override TypeDisplayData OnGetTypeDisplayData (EvaluationContext gctx, object type)
{
+ MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
+ TargetType tt = (TargetType) type;
+ if (tt.HasClassType) {
+ TypeDisplayData data = new TypeDisplayData ();
+ if (tt.ClassType.DebuggerTypeProxyAttribute != null) {
+ data.ProxyType = tt.ClassType.DebuggerTypeProxyAttribute.ProxyTypeName;
+ data.IsProxyType = true;
+ }
+ if (tt.ClassType.DebuggerDisplayAttribute != null) {
+ data.NameDisplayString = tt.ClassType.DebuggerDisplayAttribute.Name;
+ data.TypeDisplayString = tt.ClassType.DebuggerDisplayAttribute.Type;
+ data.ValueDisplayString = tt.ClassType.DebuggerDisplayAttribute.Value;
+ }
+ foreach (MemberReference mem in ObjectUtil.GetTypeMembers (ctx, tt, true, true, true, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
+ if (mem.Member.DebuggerBrowsableState.HasValue) {
+ if (data.MemberData == null)
+ data.MemberData = new Dictionary<string, DebuggerBrowsableState> ();
+ data.MemberData [mem.Member.Name] = mem.Member.DebuggerBrowsableState.Value;
+ }
+ }
+ return data;
+ }
return base.OnGetTypeDisplayData (ctx, type);
}