From: John Salem Date: Mon, 25 Feb 2019 22:53:16 +0000 (-0800) Subject: Simplify getting exposed Assembly, and specifies parameter types for GetSourceLineInfo X-Git-Tag: submit/tizen/20210909.063632~11030^2~2380^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1986f5d524f1f86806051a8bd955f9d21fd00d01;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Simplify getting exposed Assembly, and specifies parameter types for GetSourceLineInfo Commit migrated from https://github.com/dotnet/coreclr/commit/3d26dad131abc354aeb4388139ecfaafe6cc4c60 --- diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs index 8b6d73e..8885db9 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs @@ -117,7 +117,13 @@ namespace System.Diagnostics return; } - MethodInfo symbolsMethodInfo = symbolsType.GetMethod("GetSourceLineInfo", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); + Type[] parameterTypes = new Type[] + { + typeof(string), typeof(IntPtr), typeof(int), typeof(IntPtr), + typeof(int), typeof(int), typeof(int), + typeof(string).MakeByRefType(), typeof(int).MakeByRefType(), typeof(int).MakeByRefType() + }; + MethodInfo symbolsMethodInfo = symbolsType.GetMethod("GetSourceLineInfo", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, parameterTypes, null); if (symbolsMethodInfo == null) { return; diff --git a/src/coreclr/src/vm/debugdebugger.cpp b/src/coreclr/src/vm/debugdebugger.cpp index ca6cfb0..d63433f 100644 --- a/src/coreclr/src/vm/debugdebugger.cpp +++ b/src/coreclr/src/vm/debugdebugger.cpp @@ -518,7 +518,7 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal, pILI4[iNumValidFrames] = data.pElements[i].dwILOffset; // Assembly - OBJECTREF pAssembly = pFunc->GetAssembly()->GetDomainAssembly()->GetExposedAssemblyObject(); + OBJECTREF pAssembly = pFunc->GetAssembly()->GetExposedObject(); pStackFrameHelper->rgAssembly->SetAt(iNumValidFrames, pAssembly); if (data.fDoWeHaveAnyFramesFromForeignStackTrace)