Browse Source

Minor tweaks

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5173 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 16 years ago
parent
commit
b138040f0e
  1. 10
      src/AddIns/Misc/Debugger/Debugger.Core/Eval.cs
  2. 3
      src/AddIns/Misc/Debugger/Debugger.Core/ManagedCallback.cs
  3. 5
      src/AddIns/Misc/Debugger/Debugger.Core/MetaData/DebugType.cs
  4. 1
      src/AddIns/Misc/Debugger/Debugger.Core/NRefactory/Visitors/ExpressionEvaluator.cs
  5. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Thread.cs
  6. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Value.cs

10
src/AddIns/Misc/Debugger/Debugger.Core/Eval.cs

@ -123,9 +123,17 @@ namespace Debugger @@ -123,9 +123,17 @@ namespace Debugger
{
appDomain.Process.AssertPaused();
// TODO: Select thread in the correct AppDomain
Thread targetThread = appDomain.Process.SelectedThread;
if (targetThread.CorThread.GetAppDomain().GetID() != appDomain.ID) {
foreach(Thread thread in appDomain.Process.Threads) {
if (thread.CorThread.GetAppDomain().GetID() == appDomain.ID) {
targetThread = thread;
break;
}
}
}
if (targetThread == null) {
throw new GetValueException("Can not evaluate because no thread is selected");
}

3
src/AddIns/Misc/Debugger/Debugger.Core/ManagedCallback.cs

@ -420,7 +420,8 @@ namespace Debugger @@ -420,7 +420,8 @@ namespace Debugger
} else {
EnterCallback(PausedReason.Other, "ExitThread " + pThread.GetID(), process.CorProcess);
// TODO: Investigate
// .NET 4.0 - It seems that the API is reporting exits of threads without announcing their creation.
// TODO: Remove in next .NET 4.0 beta and investigate
process.TraceMessage("ERROR: Thread does not exist " + pThread.GetID());
}

5
src/AddIns/Misc/Debugger/Debugger.Core/MetaData/DebugType.cs

@ -1086,7 +1086,8 @@ namespace Debugger.MetaData @@ -1086,7 +1086,8 @@ namespace Debugger.MetaData
DebugType(AppDomain appDomain, ICorDebugType corType)
{
if (corType == null) throw new ArgumentNullException("corType");
if (corType == null)
throw new ArgumentNullException("corType");
this.corType = corType;
this.corElementType = (CorElementType)corType.GetTheType();
@ -1124,6 +1125,8 @@ namespace Debugger.MetaData @@ -1124,6 +1125,8 @@ namespace Debugger.MetaData
// Get class props
this.module = appDomain.Process.Modules[corType.GetClass().GetModule()];
this.classProps = module.MetaData.GetTypeDefProps(corType.GetClass().GetToken());
if (this.DebugModule.AppDomain != appDomain)
throw new DebuggerException("The specified AppDomain was inccorect");
// Get the enclosing class
if (!this.IsPublic && !this.IsNotPublic) {
uint enclosingTk = module.MetaData.GetNestedClassProps((uint)this.MetadataToken).EnclosingClass;

1
src/AddIns/Misc/Debugger/Debugger.Core/NRefactory/Visitors/ExpressionEvaluator.cs

@ -753,7 +753,6 @@ namespace ICSharpCode.NRefactory.Visitors @@ -753,7 +753,6 @@ namespace ICSharpCode.NRefactory.Visitors
if (left.Value.IsNull || right.Value.IsNull) {
return CreateValue(left.Value.IsNull && right.Value.IsNull);
} else {
// TODO: Make sure this works for byrefs and arrays
return CreateValue(left.Value.Address == right.Value.Address);
}
}

2
src/AddIns/Misc/Debugger/Debugger.Core/Thread.cs

@ -303,7 +303,7 @@ namespace Debugger @@ -303,7 +303,7 @@ namespace Debugger
StackFrame stackFrame;
try {
stackFrame = new StackFrame(this, (ICorDebugILFrame)corFrame, corChainIndex, corFrameIndex);
} catch (COMException) { // TODO
} catch (COMException) { // TODO: Remove
continue;
};
yield return stackFrame;

2
src/AddIns/Misc/Debugger/Debugger.Core/Value.cs

@ -201,7 +201,7 @@ namespace Debugger @@ -201,7 +201,7 @@ namespace Debugger
return this;
} else if (this.CorValue is ICorDebugReferenceValue) {
if (this.CorReferenceValue.IsNull() > 0)
return this; // ("null" expression) TODO
return this; // ("null" expression) TODO: It isn't permanent
ICorDebugValue deRef = this.CorReferenceValue.Dereference();
if (deRef is ICorDebugHeapValue2) {
return new Value(appDomain, ((ICorDebugHeapValue2)deRef).CreateHandle(CorDebugHandleType.HANDLE_STRONG));

Loading…
Cancel
Save