Ensure thumb bit is set when calling FindOrCreateInitAndAddJitInfo. Add an assert...
authorChris Sienkiewicz <chsienki@microsoft.com>
Fri, 25 May 2018 01:10:44 +0000 (18:10 -0700)
committerGleb Balykov <g.balykov@samsung.com>
Tue, 18 Sep 2018 12:49:14 +0000 (15:49 +0300)
src/debug/ee/debugger.cpp
src/debug/ee/functioninfo.cpp

index d6b6912..25c047d 100644 (file)
@@ -11115,7 +11115,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent)
                     // In the EnC case, if we look for an older version, we need to find the DJI by starting 
                     // address, rather than just by MethodDesc. In the case of generics, we may need to create a DJI, so we 
                     pDJI = pDMI->FindOrCreateInitAndAddJitInfo(pEvent->SetIP.vmMethodDesc.GetRawPtr(),
-                                                               (TADDR)pEvent->SetIP.startAddress);
+                                                               PINSTRToPCODE((TADDR)pEvent->SetIP.startAddress));
                 }
 
                 if ((pDJI != NULL) && (pThread != NULL) && (pModule != NULL))
index 637924c..30afb0d 100644 (file)
@@ -1559,13 +1559,13 @@ DebuggerJitInfo *DebuggerMethodInfo::FindOrCreateInitAndAddJitInfo(MethodDesc* f
     CONTRACTL_END;
 
     _ASSERTE(fd != NULL);
+    ARM_ONLY(_ASSERTE((startAddr & THUMB_CODE) == 1))
 
     // The debugger doesn't track Lightweight-codegen methods b/c they have no metadata.
     if (fd->IsDynamicMethod())
     {
         return NULL;
     }
-
     if (startAddr == NULL)
     {
         // This will grab the start address for the current code version.