Skip to content

Commit

Permalink
Ignore other hr error, can happen if it's optimized code
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Mar 10, 2019
1 parent 62fdce5 commit 89d5dbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public unsafe uint[] GetReturnValueLiveOffset(uint ilOffset) {
const int E_UNEXPECTED = unchecked((int)0x8000FFFF);
// E_FAIL if nothing is found
const int E_FAIL = unchecked((int)0x80004005);
Debug.Assert(hr == 0 || hr == CordbgErrors.CORDBG_E_INVALID_OPCODE || hr == CordbgErrors.CORDBG_E_UNSUPPORTED || hr == E_UNEXPECTED || hr == E_FAIL);
Debug.Assert(hr == 0 || hr == CordbgErrors.CORDBG_E_INVALID_OPCODE || hr == CordbgErrors.CORDBG_E_UNSUPPORTED || hr == CordbgErrors.META_E_BAD_SIGNATURE || hr == E_UNEXPECTED || hr == E_FAIL);
if (hr < 0)
return Array.Empty<uint>();
if (totalSize == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static class CordbgErrors {
public const int CORDBG_E_IL_VAR_NOT_AVAILABLE = unchecked((int)0x80131304);
public const int CORDBG_E_INVALID_OPCODE = unchecked((int)0x80131C4D);
public const int CORDBG_E_UNSUPPORTED = unchecked((int)0x80131C4E);
public const int META_E_BAD_SIGNATURE = unchecked((int)0x80131192);

public static bool IsCantEvaluateError(int hr) => hr == CORDBG_E_ILLEGAL_IN_NATIVE_CODE ||
hr == CORDBG_E_ILLEGAL_AT_GC_UNSAFE_POINT ||
Expand Down

0 comments on commit 89d5dbd

Please sign in to comment.