diff options
author | Lluis Sanchez <lluis@novell.com> | 2009-11-20 20:22:45 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2009-11-20 20:22:45 +0300 |
commit | e49801acf58edc6c16070d7f30b157fc4ac4846d (patch) | |
tree | fed7dfb9a95dc5a364d053b542dc8ed7650c74d1 /extras/MonoDevelop.Debugger.Mdb | |
parent | a18606d27362f74bfb9fd6ab3c1e320758327817 (diff) |
2009-11-20 Lluis Sanchez Gual <lluis@novell.com>
* MonoXspDebuggerSessionFactory.cs: Implement Id property.
2009-11-19 Lluis Sanchez Gual <lluis@novell.com>
* BacktraceWrapper.cs: Subclass BaseBacktrace and reuse some
code from it.
* MdbObjectValueAdaptor.cs: Track api changes. Improved check
for evaluation options.
2009-11-18 Lluis Sanchez Gual <lluis@novell.com>
* MdbObjectValueAdaptor.cs: Always show properties, even if we
can't evaluate them.
* IndexerValueReference.cs: Don't allow evaluating properties
if target invoke is disabled.
2009-11-18 Lluis Sanchez Gual <lluis@novell.com>
* DebuggerServer.cs:
* BacktraceWrapper.cs:
* EvaluationContext.cs:
* MdbObjectValueAdaptor.cs: Track api changes.
2009-11-17 Lluis Sanchez Gual <lluis@novell.com>
* DebuggerServer.cs:
* BacktraceWrapper.cs:
* EvaluationContext.cs:
* MdbObjectValueAdaptor.cs: Use the new options object. Track
api changes.
2009-11-20 Lluis Sanchez Gual <lluis@novell.com>
* MonoDebuggerSessionFactory.cs: Implement Id property.
2009-11-17 Lluis Sanchez Gual <lluis@novell.com>
* IDebuggerServer.cs:
* MonoDebuggerSession.cs: Use the new options object. Track
api changes.
svn path=/branches/monodevelop/extras/MonoDevelop.Debugger.Mdb/2.2/; revision=146630
Diffstat (limited to 'extras/MonoDevelop.Debugger.Mdb')
12 files changed, 118 insertions, 98 deletions
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog index 0c050e7231..0343e805c8 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog @@ -1,3 +1,7 @@ +2009-11-20 Lluis Sanchez Gual <lluis@novell.com> + + * MonoXspDebuggerSessionFactory.cs: Implement Id property. + 2009-10-30 Lluis Sanchez Gual <lluis@novell.com> * AssemblyInfo.cs: diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs index c12206db17..6013c3ed2e 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs @@ -41,7 +41,11 @@ namespace MonoDevelop.Debugger.Mdb public class MonoXspDebuggerSessionFactory: IDebuggerEngine { public string Name { - get { return "Mono Debugger"; } + get { return "Mono Debugger for ASP.NET"; } + } + + public string Id { + get { return "Mono.Debugger.Mdb.AspNet"; } } public bool CanDebugCommand (ExecutionCommand command) diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog index a24ee9e779..3d803c0f95 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog @@ -1,3 +1,13 @@ +2009-11-20 Lluis Sanchez Gual <lluis@novell.com> + + * MonoDebuggerSessionFactory.cs: Implement Id property. + +2009-11-17 Lluis Sanchez Gual <lluis@novell.com> + + * IDebuggerServer.cs: + * MonoDebuggerSession.cs: Use the new options object. Track + api changes. + 2009-10-30 Lluis Sanchez Gual <lluis@novell.com> * AssemblyInfo.cs: diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs index b71acfa70a..5f7290cc52 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs @@ -34,11 +34,11 @@ namespace Mono.Debugging.Backend.Mdb { string InitializeMdb (string mdbVersion, int mdPid); - void Run (MonoDebuggerStartInfo startInfo); + void Run (MonoDebuggerStartInfo startInfo, DebuggerSessionOptions options); void Stop (); - void AttachToProcess (long id); + void AttachToProcess (long id, DebuggerSessionOptions options); void Detach (); diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs index baa8023959..7a08b05779 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs @@ -58,7 +58,7 @@ namespace Mono.Debugging.Backend.Mdb MonoDebuggerStartInfo info = (MonoDebuggerStartInfo) startInfo; controller.StartDebugger (info); InitMdbVersion (info.MonoPrefix); - controller.DebuggerServer.Run (info); + controller.DebuggerServer.Run (info, Options); } void InitMdbVersion (string prefix) @@ -75,7 +75,7 @@ namespace Mono.Debugging.Backend.Mdb started = true; controller.StartDebugger (null); InitMdbVersion ("?"); - controller.DebuggerServer.AttachToProcess (processId); + controller.DebuggerServer.AttachToProcess (processId, Options); } protected override void OnDetach () diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs index 0514276685..3d6947f63a 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs @@ -43,6 +43,10 @@ namespace MonoDevelop.Debugger.Mdb get { return "Mono Debugger"; } } + public string Id { + get { return "Mono.Debugger.Mdb"; } + } + public bool CanDebugCommand (ExecutionCommand command) { DotNetExecutionCommand cmd = command as DotNetExecutionCommand; diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs index 03dd4c5bac..e440d39253 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs @@ -12,13 +12,13 @@ using Mono.Debugger.Languages; namespace DebuggerServer { - class BacktraceWrapper: RemoteFrameObject, IBacktrace, IDisposable + class BacktraceWrapper: BaseBacktrace, IBacktrace, IDisposable { MD.StackFrame[] frames; DissassemblyBuffer[] disBuffers; bool disposed; - public BacktraceWrapper (MD.StackFrame[] frames) + public BacktraceWrapper (MD.StackFrame[] frames): base (Server.Instance.MdbObjectValueAdaptor) { this.frames = frames; Connect (); @@ -29,11 +29,11 @@ namespace DebuggerServer disposed = true; } - public int FrameCount { + public override int FrameCount { get { return frames.Length; } } - public DL.StackFrame[] GetStackFrames (int firstIndex, int lastIndex) + public override DL.StackFrame[] GetStackFrames (int firstIndex, int lastIndex) { CheckDisposed (); @@ -72,16 +72,14 @@ namespace DebuggerServer return list.ToArray (); } - protected EvaluationContext GetEvaluationContext (int frameIndex, int timeout) + protected override EvaluationContext GetEvaluationContext (int frameIndex, EvaluationOptions options) { CheckDisposed (); - if (timeout == -1) - timeout = DebuggerServer.DefaultEvaluationTimeout; MD.StackFrame frame = frames [frameIndex]; - return new MdbEvaluationContext (frame.Thread, frame, timeout); + return new MdbEvaluationContext (frame.Thread, frame, options); } - public AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count) + public override AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count) { CheckDisposed (); if (disBuffers == null) @@ -102,63 +100,6 @@ namespace DebuggerServer if (disposed) throw new InvalidOperationException ("Invalid stack frame"); } - - public ObjectValue[] GetAllLocals (int frameIndex, int timeout) - { - List<ObjectValue> locals = new List<ObjectValue> (); - - locals.AddRange (GetLocalVariables (frameIndex, timeout)); - locals.AddRange (GetParameters (frameIndex, timeout)); - locals.Sort (delegate (ObjectValue v1, ObjectValue v2) { - return v1.Name.CompareTo (v2.Name); - }); - - ObjectValue thisObj = GetThisReference (frameIndex, timeout); - if (thisObj != null) - locals.Insert (0, thisObj); - - return locals.ToArray (); - } - - public ObjectValue[] GetExpressionValues (int frameIndex, string[] expressions, bool evaluateMethods, int timeout) - { - EvaluationContext ctx = GetEvaluationContext (frameIndex, timeout); - return ctx.Adapter.GetExpressionValuesAsync (ctx, expressions, evaluateMethods, timeout); - } - - public ObjectValue[] GetLocalVariables (int frameIndex, int timeout) - { - EvaluationContext ctx = GetEvaluationContext (frameIndex, timeout); - List<ObjectValue> list = new List<ObjectValue> (); - foreach (ValueReference var in ctx.Adapter.GetLocalVariables (ctx)) - list.Add (var.CreateObjectValue (true)); - return list.ToArray (); - } - - public ObjectValue[] GetParameters (int frameIndex, int timeout) - { - EvaluationContext ctx = GetEvaluationContext (frameIndex, timeout); - List<ObjectValue> vars = new List<ObjectValue> (); - foreach (ValueReference var in ctx.Adapter.GetParameters (ctx)) - vars.Add (var.CreateObjectValue (true)); - return vars.ToArray (); - } - - public ObjectValue GetThisReference (int frameIndex, int timeout) - { - EvaluationContext ctx = GetEvaluationContext (frameIndex, timeout); - ValueReference var = ctx.Adapter.GetThisReference (ctx); - if (var != null) - return var.CreateObjectValue (); - else - return null; - } - - public virtual CompletionData GetExpressionCompletionData (int frameIndex, string exp) - { - EvaluationContext ctx = GetEvaluationContext (frameIndex, 400); - return ctx.Adapter.GetExpressionCompletionData (ctx, exp); - } } class MdbDissassemblyBuffer: DissassemblyBuffer diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog index 8a081e782d..d71ed17983 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog @@ -1,3 +1,34 @@ +2009-11-19 Lluis Sanchez Gual <lluis@novell.com> + + * BacktraceWrapper.cs: Subclass BaseBacktrace and reuse some + code from it. + + * MdbObjectValueAdaptor.cs: Track api changes. Improved check + for evaluation options. + +2009-11-18 Lluis Sanchez Gual <lluis@novell.com> + + * MdbObjectValueAdaptor.cs: Always show properties, even if we + can't evaluate them. + + * IndexerValueReference.cs: Don't allow evaluating properties + if target invoke is disabled. + +2009-11-18 Lluis Sanchez Gual <lluis@novell.com> + + * DebuggerServer.cs: + * BacktraceWrapper.cs: + * EvaluationContext.cs: + * MdbObjectValueAdaptor.cs: Track api changes. + +2009-11-17 Lluis Sanchez Gual <lluis@novell.com> + + * DebuggerServer.cs: + * BacktraceWrapper.cs: + * EvaluationContext.cs: + * MdbObjectValueAdaptor.cs: Use the new options object. Track + api changes. + 2009-10-18 Michael Hutchinson <mhutchinson@novell.com> * DebuggerServer.cs: Fix Pocess/Process spelling. diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs index 3637380b73..2ac6f957ae 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs @@ -43,11 +43,8 @@ namespace DebuggerServer MdbObjectValueAdaptor mdbObjectValueAdaptor; - public const int DefaultAsyncSwitchTimeout = 60; - public const int DefaultEvaluationTimeout = 1000; - public const int DefaultChildEvaluationTimeout = 5000; - const int BreakEventUpdateNotifyDelay = 500; + public DebuggerSessionOptions SessionOptions; public DebuggerServer (IDebuggerController dc) { @@ -114,7 +111,7 @@ namespace DebuggerServer Environment.Exit (1); } - public void Run (MonoDebuggerStartInfo startInfo) + public void Run (MonoDebuggerStartInfo startInfo, DebuggerSessionOptions sessionOptions) { try { if (startInfo == null) @@ -122,6 +119,7 @@ namespace DebuggerServer Console.WriteLine ("MDB version: " + mdbAdaptor.MdbVersion); + this.SessionOptions = sessionOptions; mdbAdaptor.StartInfo = startInfo; Report.Initialize (); @@ -174,10 +172,11 @@ namespace DebuggerServer } } - public void AttachToProcess (long pid) + public void AttachToProcess (long pid, DebuggerSessionOptions sessionOptions) { Report.Initialize (); + this.SessionOptions = sessionOptions; DebuggerConfiguration config = new DebuggerConfiguration (); mdbAdaptor.Configuration = config; mdbAdaptor.InitializeConfiguration (); @@ -317,7 +316,7 @@ namespace DebuggerServer if (bp != null && !running && !initializing && activeThread.CurrentFrame != null && !string.IsNullOrEmpty (bp.ConditionExpression) && bp.BreakIfConditionChanges) { // Initial expression evaluation - MdbEvaluationContext ctx = new MdbEvaluationContext (activeThread, activeThread.CurrentFrame, -1); + MdbEvaluationContext ctx = new MdbEvaluationContext (activeThread, activeThread.CurrentFrame, SessionOptions.EvaluationOptions); ML.TargetObject ob = EvaluateExp (ctx, bp.ConditionExpression); if (ob != null) lastConditionValue [ev.Index] = evaluator.TargetObjectToExpression (ctx, ob); @@ -371,7 +370,7 @@ namespace DebuggerServer return false; } - MdbEvaluationContext ctx = new MdbEvaluationContext (frame.Thread, frame, -1); + MdbEvaluationContext ctx = new MdbEvaluationContext (frame.Thread, frame, SessionOptions.EvaluationOptions); DL.Breakpoint bp = be as DL.Breakpoint; if (bp != null && !string.IsNullOrEmpty (bp.ConditionExpression)) { ML.TargetObject val = EvaluateExp (ctx, bp.ConditionExpression); @@ -419,9 +418,11 @@ namespace DebuggerServer { ValueReference var; try { - EvaluationOptions ops = new EvaluationOptions (); - ops.CanEvaluateMethods = true; - var = (ValueReference) Server.Instance.Evaluator.Evaluate (ctx, exp, ops); + EvaluationContext cctx = ctx.Clone (); + EvaluationOptions ops = cctx.Options; + ops.AllowMethodEvaluation = true; + cctx.Options = ops; + var = (ValueReference) Server.Instance.Evaluator.Evaluate (cctx, exp); return (ML.TargetObject) var.Value; } catch { return null; @@ -594,7 +595,7 @@ namespace DebuggerServer params ML.TargetObject[] param_objects) { MethodCall mc = new MethodCall (ctx, function, object_argument, param_objects); - ctx.Adapter.AsyncExecute (mc, ctx.Timeout); + ctx.Adapter.AsyncExecute (mc, ctx.Options.EvaluationTimeout); return mc.ReturnValue; } @@ -793,7 +794,7 @@ namespace DebuggerServer } if ((args.Type == MD.TargetEventType.UnhandledException || args.Type == MD.TargetEventType.Exception) && (args.Data is TargetAddress)) { - MdbEvaluationContext ctx = new MdbEvaluationContext (args.Frame.Thread, args.Frame, -1); + MdbEvaluationContext ctx = new MdbEvaluationContext (args.Frame.Thread, args.Frame, SessionOptions.EvaluationOptions); targetArgs.Exception = LiteralValueReference.CreateTargetObjectLiteral (ctx, "Exception", args.Frame.ExceptionObject).CreateObjectValue (); } diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs index a8140d774a..447b203b3e 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs @@ -49,13 +49,12 @@ namespace DebuggerServer } } - public MdbEvaluationContext (Thread thread, StackFrame frame, int timeout) + public MdbEvaluationContext (Thread thread, StackFrame frame, Mono.Debugging.Client.EvaluationOptions options): base (options) { Evaluator = Server.Instance.Evaluator; Adapter = Server.Instance.MdbObjectValueAdaptor; this.thread = thread; this.frame = frame; - Timeout = timeout; } public TargetObject GetRealObject (object ob) diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs index 39f90d5d79..2b07503443 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs @@ -84,7 +84,11 @@ namespace DebuggerServer Server.Instance.RuntimeInvoke (ctx, indexer.Setter, target, new TargetObject [] {cindex, cvalue}); } } - + + protected override bool CanEvaluate () + { + return Context.Options.AllowTargetInvoke; + } public override object Type { get { 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 686d81d00a..9b61f95234 100644 --- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs +++ b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs @@ -43,7 +43,7 @@ namespace DebuggerServer { public override string CallToString (EvaluationContext gctx, object obj) { - if (!gctx.AllowTargetInvoke) + if (!gctx.Options.AllowTargetInvoke) return GetValueTypeName (gctx, obj); MdbEvaluationContext ctx = (MdbEvaluationContext) gctx; TargetObject retval = CallMethod (ctx, "ToString", (TargetStructObject) obj); @@ -103,10 +103,10 @@ namespace DebuggerServer TargetStructObject co = obj as TargetStructObject; if (co == null) return null; - if (ctx.AllowTargetInvoke) { + if (ctx.Options.AllowTargetInvoke) { if (co.TypeName == "System.Decimal") return new LiteralExp (CallToString (ctx, co)); - if (tdata.ValueDisplayString != null) + if (tdata.ValueDisplayString != null && ctx.Options.AllowDisplayStringEvaluation) return new LiteralExp (EvaluateDisplayString (ctx, co, tdata.ValueDisplayString)); } @@ -194,7 +194,6 @@ namespace DebuggerServer 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; @@ -219,6 +218,12 @@ namespace DebuggerServer return ctx.GetRealObject (val) is TargetFundamentalObject; } + public override bool IsEnum (EvaluationContext gctx, object val) + { + MdbEvaluationContext ctx = (MdbEvaluationContext) gctx; + return ctx.GetRealObject (val) is TargetEnumObject; + } + public override bool IsNull (EvaluationContext gctx, object val) { MdbEvaluationContext ctx = (MdbEvaluationContext) gctx; @@ -423,7 +428,7 @@ namespace DebuggerServer TargetFieldInfo field = (TargetFieldInfo)mem.Member; yield return new FieldReference (ctx, co, mem.DeclaringType, field); } - if (mem.Member is TargetPropertyInfo && gctx.AllowTargetInvoke) { + if (mem.Member is TargetPropertyInfo) { TargetPropertyInfo prop = (TargetPropertyInfo) mem.Member; if (prop.CanRead && (prop.Getter.ParameterTypes == null || prop.Getter.ParameterTypes.Length == 0)) yield return new PropertyReference (ctx, prop, co); @@ -528,19 +533,19 @@ namespace DebuggerServer return ObjectValue.CreateUnknown (path.LastName); else { string tvalue; - if (!string.IsNullOrEmpty (tdata.ValueDisplayString)) + if (!string.IsNullOrEmpty (tdata.ValueDisplayString) && ctx.Options.AllowDisplayStringEvaluation) tvalue = EvaluateDisplayString (ctx, co, tdata.ValueDisplayString); else tvalue = ctx.Evaluator.TargetObjectToExpression (ctx, obj); string tname; - if (!string.IsNullOrEmpty (tdata.TypeDisplayString)) + if (!string.IsNullOrEmpty (tdata.TypeDisplayString) && ctx.Options.AllowDisplayStringEvaluation) tname = EvaluateDisplayString (ctx, co, tdata.TypeDisplayString); else tname = obj.TypeName; ObjectValue val = ObjectValue.CreateObject (source, path, tname, tvalue, flags, null); - if (!string.IsNullOrEmpty (tdata.NameDisplayString)) + if (!string.IsNullOrEmpty (tdata.NameDisplayString) && ctx.Options.AllowDisplayStringEvaluation) val.Name = EvaluateDisplayString (ctx, co, tdata.NameDisplayString); return val; } @@ -579,7 +584,7 @@ namespace DebuggerServer return ObjectValue.CreateObject (source, path, obj.TypeName, ctx.Evaluator.ToExpression (null), flags, new ObjectValue [0]); } default: - return ObjectValue.CreateError (path.LastName, "Unknown value type: " + obj.Kind, flags); + return ObjectValue.CreateFatalError (path.LastName, "Unknown value type: " + obj.Kind, flags); } } @@ -1071,6 +1076,15 @@ namespace DebuggerServer this.object_argument = object_argument; this.param_objects = param_objects; } + + public override string Description { + get { + if (function.DeclaringType != null) + return function.DeclaringType.Name + "." + function.Name; + else + return function.Name; + } + } public override void Invoke ( ) { @@ -1084,11 +1098,19 @@ namespace DebuggerServer Server.Instance.MdbAdaptor.AbortThread (ctx.Thread, res); WaitToStop (ctx.Thread); } + + public override void Shutdown () + { + res.Abort (); + if (!res.CompletedEvent.WaitOne (200)) + return; + Server.Instance.MdbAdaptor.AbortThread (ctx.Thread, res); + } public override bool WaitForCompleted (int timeout) { - if (ctx.Timeout != -1) { - if (!res.CompletedEvent.WaitOne (ctx.Timeout, false)) + if (timeout != -1) { + if (!res.CompletedEvent.WaitOne (timeout, false)) return false; } else { |