Simplify getting exposed Assembly, and specifies parameter types for GetSourceLineInfo
authorJohn Salem <josalem@microsoft.com>
Mon, 25 Feb 2019 22:53:16 +0000 (14:53 -0800)
committerJohn Salem <josalem@microsoft.com>
Mon, 25 Feb 2019 22:53:16 +0000 (14:53 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/3d26dad131abc354aeb4388139ecfaafe6cc4c60

src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs
src/coreclr/src/vm/debugdebugger.cpp

index 8b6d73e..8885db9 100644 (file)
@@ -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;
index ca6cfb0..d63433f 100644 (file)
@@ -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)