Skip to content

Commit

Permalink
Ignore deprecated OffsetToStringData warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Jul 23, 2020
1 parent f9178f8 commit 544eb59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ DbgDotNetValueResult GetArrayElementAt_CorDebug(uint index) {
offsetToStringData = IntPtr.Size == 4 ? OffsetToStringData32_CLR2 : OffsetToStringData64_CLR2;
else {
offsetToStringData = IntPtr.Size == 4 ? OffsetToStringData32 : OffsetToStringData64;
#pragma warning disable CS0618
Debug.Assert(offsetToStringData == RuntimeHelpers.OffsetToStringData);
#pragma warning restore CS0618
}
uint stringLength = v.StringLength;
Debug.Assert((ulong)offsetToStringData + stringLength * 2 <= size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public bool TryCreate([NotNullWhen(true)] out ObjectConstants? objectConstants)
var type = thread.Domain.Corlib.GetType("System.Runtime.CompilerServices.RuntimeHelpers");
if (type is null)
return null;
#pragma warning disable CS0618
var method = type.GetMethod("get_" + nameof(System.Runtime.CompilerServices.RuntimeHelpers.OffsetToStringData));
#pragma warning restore CS0618
if (method is null)
return null;
var res = Call(method, Array.Empty<Value>());
Expand Down

0 comments on commit 544eb59

Please sign in to comment.