diff options
11 files changed, 2 insertions, 134 deletions
diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs b/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs index 92fff095b0..ccb7a7990c 100644 --- a/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs +++ b/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs @@ -240,14 +240,6 @@ namespace MonoDevelop.Debugger.Gdb return val; } - public bool HasChildren (ObjectPath path, EvaluationOptions options) - { - session.SelectThread (threadId); - GdbCommandResult res = session.RunCommand ("-var-info-num-children", path.Join (".")); - - return res.GetInt ("numchild") > 0; - } - public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { List<ObjectValue> children = new List<ObjectValue> (); diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs index f5e673149a..1abf0e6a7a 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs @@ -33,7 +33,6 @@ namespace Mono.Debugging.Backend { public interface IObjectValueSource { - bool HasChildren (ObjectPath path, EvaluationOptions options); ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options); EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options); ObjectValue GetValue (ObjectPath path, EvaluationOptions options); diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs index 4221d09b95..ae92d37643 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs @@ -402,7 +402,7 @@ namespace Mono.Debugging.Client else if (IsArray) return arrayCount > 0; else if (IsObject) - return source.HasChildren (path, parentFrame.DebuggerSession.EvaluationOptions); + return true; else return false; } diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs index b2b4e0b052..a7b95edfc2 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs @@ -93,25 +93,6 @@ namespace Mono.Debugging.Evaluation return res; } - public bool HasChildren (EvaluationOptions options) - { - return HasChildren (new ObjectPath ("this"), options); - } - - public bool HasChildren (ObjectPath path, EvaluationOptions options) - { - EvaluationContext cctx = ctx.WithOptions (options); - - if (path.Length > 1) { - // Looking for children of an array element - int[] idx = StringToIndices (path [1]); - object obj = array.GetElement (idx); - return cctx.Adapter.ObjectValueHasChildren (cctx, new ArrayObjectSource (array, path[1]), obj); - } - - return true; - } - public ObjectValue[] GetChildren (EvaluationOptions options) { return GetChildren (new ObjectPath ("this"), -1, -1, options); diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs index 887957aa80..b9cfde2d9d 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs @@ -57,12 +57,6 @@ namespace Mono.Debugging.Evaluation } #region IObjectValueSource implementation - public bool HasChildren (ObjectPath path, EvaluationOptions options) - { - EvaluationContext cctx = ctx.WithOptions (options); - return cctx.Adapter.ObjectValueHasChildren (cctx, objectSource, type, obj, false); - } - public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { EvaluationContext cctx = ctx.WithOptions (options); diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs index bd0395eb6e..d7e0ac01a8 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs @@ -114,11 +114,6 @@ namespace Mono.Debugging.Evaluation this.ctx = ctx; Connect (); } - - public bool HasChildren (ObjectPath path, EvaluationOptions options) - { - return false; - } public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs index e604ba888a..225ca14b6b 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs @@ -72,32 +72,6 @@ namespace Mono.Debugging.Evaluation return val; } - public bool HasChildren (ObjectPath path, EvaluationOptions options) - { - EvaluationContext cctx = ctx.WithOptions (options); - TypeDisplayData tdata = null; - object tdataType = null; - - foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) { - object decType = val.DeclaringType; - if (decType != null && decType != tdataType) { - tdataType = decType; - tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType); - } - - DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name); - if (state == DebuggerBrowsableState.Never) - continue; - - return true; - } - - if ((bindingFlags & BindingFlags.NonPublic) == 0) - return true; - - return false; - } - public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { EvaluationContext cctx = ctx.WithOptions (options); diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs index 9aba49909b..836cf37c2e 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs @@ -53,12 +53,6 @@ namespace Mono.Debugging.Evaluation val.ChildSelector = ""; return val; } - - public bool HasChildren (ObjectPath path, EvaluationOptions options) - { - EvaluationContext cctx = ctx.WithOptions (options); - return cctx.Adapter.ObjectValueHasChildren (cctx, objectSource, cctx.Adapter.GetValueType (cctx, obj), obj, false); - } public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs index 1be0d43879..a673f38efd 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs @@ -120,54 +120,6 @@ namespace Mono.Debugging.Evaluation return null; } - public override bool HasChildren (ObjectPath path, EvaluationOptions options) - { - EvaluationContext ctx = GetContext (options); - - try { - BindingFlags flattenFlag = options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly; - BindingFlags flags = BindingFlags.Static | BindingFlags.Public | flattenFlag; - bool groupPrivateMembers = options.GroupPrivateMembers && (options.GroupUserPrivateMembers || ctx.Adapter.IsExternalType (ctx, type)); - if (!groupPrivateMembers) - flags |= BindingFlags.NonPublic; - - TypeDisplayData tdata = ctx.Adapter.GetTypeDisplayData (ctx, type); - object tdataType = type; - - foreach (ValueReference val in ctx.Adapter.GetMembersSorted (ctx, this, type, null, flags)) { - object decType = val.DeclaringType; - if (decType != null && decType != tdataType) { - tdataType = decType; - tdata = ctx.Adapter.GetTypeDisplayData (ctx, decType); - } - - DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name); - if (state == DebuggerBrowsableState.Never) - continue; - - return true; - } - - if (ctx.Adapter.GetNestedTypes (ctx, type).Count () > 0) - return true; - - if (groupPrivateMembers) - return true; - - if (!options.FlattenHierarchy) { - object baseType = ctx.Adapter.GetBaseType (ctx, type, false); - if (baseType != null) - return true; - } - - return false; - } catch (Exception ex) { - Console.WriteLine (ex); - ctx.WriteDebuggerOutput (ex.Message); - return false; - } - } - public override ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { EvaluationContext ctx = GetContext (options); diff --git a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs index eafe554afb..fa9eccd27e 100644 --- a/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs +++ b/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs @@ -185,11 +185,6 @@ namespace Mono.Debugging.Evaluation Value = ctx.Adapter.FromRawValue (GetContext (options), value); } - bool IObjectValueSource.HasChildren (ObjectPath path, EvaluationOptions options) - { - return HasChildren (path, options); - } - ObjectValue[] IObjectValueSource.GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { return GetChildren (path, index, count, options); @@ -200,15 +195,6 @@ namespace Mono.Debugging.Evaluation return ctx.Adapter.CallToString (ctx, Value); } - public virtual bool HasChildren (ObjectPath path, EvaluationOptions options) - { - try { - return ctx.Adapter.ObjectValueHasChildren (GetChildrenContext (options), this, Value); - } catch { - return false; - } - } - public virtual ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) { try { diff --git a/main/src/core/MonoDevelop.Ide/BuildVariables.cs b/main/src/core/MonoDevelop.Ide/BuildVariables.cs index 6004f3940a..9343b2a277 100644 --- a/main/src/core/MonoDevelop.Ide/BuildVariables.cs +++ b/main/src/core/MonoDevelop.Ide/BuildVariables.cs @@ -6,3 +6,4 @@ namespace MonoDevelop.Ide public static string PackageVersionLabel = "3.0.4.6"; } } + |