Browse Source

SD2-1443 - Moving mouse over "ref" parameter after stack overflow causes exception

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3452 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
97f4fbf9e2
  1. 3
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs
  2. 10
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs

3
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/Eval.cs

@ -124,6 +124,9 @@ namespace Debugger @@ -124,6 +124,9 @@ namespace Debugger
// The operation failed because it is a GC unsafe point. (Exception from HRESULT: 0x80131C23)
// This can probably happen when we break and the thread is in native code
throw new GetValueException("Thread is in GC unsafe point");
} else if ((uint)e.ErrorCode == 0x80131C22) {
// The operation is illegal because of a stack overflow.
throw new GetValueException("Can not evaluate after stack overflow");
} else {
throw;
}

10
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Control/StackFrame.cs

@ -317,7 +317,17 @@ namespace Debugger @@ -317,7 +317,17 @@ namespace Debugger
}
// Method arguments can be passed 'by ref'
if (corValue.Type == (uint)CorElementType.BYREF) {
try {
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference();
} catch (COMException e) {
if ((uint)e.ErrorCode == 0x80131305) {
// A reference value was found to be bad during dereferencing.
// This can sometimes happen after a stack overflow
throw new GetValueException("Bad reference");
} else {
throw;
}
}
}
return corValue;
}

Loading…
Cancel
Save