diff options
author | Lluis Sanchez <lluis@novell.com> | 2009-11-23 21:34:30 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2009-11-23 21:34:30 +0300 |
commit | b0dbc9e35c4833080fc400aa3a44bee90f56aff2 (patch) | |
tree | 8d17f58d3d5b3023a1eb41579e3bd29abf19cd46 | |
parent | e49801acf58edc6c16070d7f30b157fc4ac4846d (diff) |
2009-11-23 Lluis Sanchez Gual <lluis@novell.com>
* Convert.cs: Improve conversion of corlib types.
svn path=/branches/monodevelop/extras/MonoDevelop.Debugger.Mdb/2.2/; revision=146760
-rw-r--r-- | extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog | 4 | ||||
-rw-r--r-- | extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs | 26 |
2 files changed, 22 insertions, 8 deletions
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog index d71ed17983..57ff94e5d7 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog @@ -1,3 +1,7 @@ +2009-11-23 Lluis Sanchez Gual <lluis@novell.com> + + * Convert.cs: Improve conversion of corlib types. + 2009-11-19 Lluis Sanchez Gual <lluis@novell.com> * BacktraceWrapper.cs: Subclass BaseBacktrace and reuse some diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs index ccd4042191..4bd229da11 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs @@ -210,6 +210,12 @@ namespace DebuggerServer if (source == target) return true; + if (source.Module.Name.StartsWith ("mscorlib,") && target.Module.Name.StartsWith ("mscorlib,")) { + Type t1 = Type.GetType (source.Name); + Type t2 = Type.GetType (target.Name); + return t2.IsAssignableFrom (t1); + } + if (!source.HasParent) return false; @@ -224,14 +230,18 @@ namespace DebuggerServer if (obj.Type == type) return obj; - if (!obj.Type.HasParent) - return null; - - TargetObject pobj = obj.GetParentObject (ctx.Thread); - if (pobj != null) - return ImplicitConversion (ctx, pobj, type); - else - return null; + if (obj.Type.HasParent) { + TargetObject pobj = obj.GetParentObject (ctx.Thread); + if (pobj != null) { + pobj = ImplicitConversion (ctx, pobj, type); + if (pobj != null) + return pobj; + } + } + + if (ImplicitReferenceConversionExists (ctx, obj.Type, type)) + return obj; + return null; } public static bool ImplicitConversionExists (MdbEvaluationContext ctx, |