|
|
|
@ -7,7 +7,7 @@
@@ -7,7 +7,7 @@
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
|
|
using System.Runtime.InteropServices; |
|
|
|
|
using Debugger.Wrappers.CorDebug; |
|
|
|
|
|
|
|
|
|
namespace Debugger |
|
|
|
@ -18,7 +18,16 @@ namespace Debugger
@@ -18,7 +18,16 @@ namespace Debugger
|
|
|
|
|
{ |
|
|
|
|
// Method arguments can be passed 'by ref'
|
|
|
|
|
if (corValue.Type == (uint)CorElementType.BYREF) { |
|
|
|
|
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference(); |
|
|
|
|
try { |
|
|
|
|
corValue = corValue.CastTo<ICorDebugReferenceValue>().Dereference(); |
|
|
|
|
} catch (COMException e) { |
|
|
|
|
// This might be an issue in optimized code. (try stepping through a Console.Write(string))
|
|
|
|
|
// A reference value was found to be bad during dereferencing. (Exception from HRESULT: 0x80131305)
|
|
|
|
|
if ((uint)e.ErrorCode == 0x80131305) { |
|
|
|
|
throw new GetValueException("A reference value was found to be bad during dereferencing"); |
|
|
|
|
} |
|
|
|
|
throw; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Pointers may be used in 'unsafe' code - CorElementType.PTR
|
|
|
|
|