After investigation the failures look unrelated to my changes. Thanks Jan and Noah.
* structs will be returned, and some of the ilOffsets in this array
* may be the values specified in CorDebugIlToNativeMappingTypes.
******************************************************************************/
-HRESULT Debugger::GetILToNativeMapping(UINT_PTR pNativeCodeStartAddress, ULONG32 cMap,
+HRESULT Debugger::GetILToNativeMapping(PCODE pNativeCodeStartAddress, ULONG32 cMap,
ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[])
{
CONTRACTL
//
HRESULT Debugger::GetILToNativeMappingIntoArrays(
- MethodDesc * pMD,
+ MethodDesc * pMethodDesc,
+ PCODE pCode,
USHORT cMapMax,
USHORT * pcMap,
UINT ** prguiILOffset,
// Get the JIT info by functionId.
- DebuggerJitInfo * pDJI = GetLatestJitInfoFromMethodDesc(pMD);
+ DebuggerJitInfo * pDJI = GetJitInfo(pMethodDesc, (const BYTE *)pCode);
// Dunno what went wrong
if (pDJI == NULL)
DebuggerJitInfo *GetLatestJitInfoFromMethodDesc(MethodDesc * pMethodDesc);
- HRESULT GetILToNativeMapping(UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap,
+ HRESULT GetILToNativeMapping(PCODE pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap,
COR_DEBUG_IL_TO_NATIVE_MAP map[]);
HRESULT GetILToNativeMappingIntoArrays(
- MethodDesc * pMD,
+ MethodDesc * pMethodDesc,
+ PCODE pCode,
USHORT cMapMax,
USHORT * pcMap,
UINT ** prguiILOffset,
BOOL fGetReJitIDs);
static VOID SendEventsForNgenMethods(Module *pModule, DWORD dwEventOptions);
static VOID SendMethodJitStartEvent(MethodDesc *pMethodDesc, SString *namespaceOrClassName=NULL, SString *methodName=NULL, SString *methodSignature=NULL);
- static VOID SendMethodILToNativeMapEvent(MethodDesc * pMethodDesc, DWORD dwEventOptions, ReJITID rejitID);
+ static VOID SendMethodILToNativeMapEvent(MethodDesc * pMethodDesc, DWORD dwEventOptions, SIZE_T pCode, ReJITID rejitID);
static VOID SendMethodEvent(MethodDesc *pMethodDesc, DWORD dwEventOptions, BOOL bIsJit, SString *namespaceOrClassName=NULL, SString *methodName=NULL, SString *methodSignature=NULL, SIZE_T pCode = 0, ReJITID rejitID = 0);
static VOID SendHelperEvent(ULONGLONG ullHelperStartAddress, ULONG ulHelperSize, LPCWSTR pHelperName);
public:
DWORD nativeOffset,
DWORD *ilOffset) = 0;
- virtual HRESULT GetILToNativeMapping(UINT_PTR pNativeCodeStartAddress,
+ virtual HRESULT GetILToNativeMapping(PCODE pNativeCodeStartAddress,
ULONG32 cMap,
ULONG32 *pcMap,
COR_DEBUG_IL_TO_NATIVE_MAP map[]) = 0;
virtual HRESULT GetILToNativeMappingIntoArrays(
- MethodDesc * pMD,
+ MethodDesc * pMethodDesc,
+ PCODE pCode,
USHORT cMapMax,
USHORT * pcMap,
UINT ** prguiILOffset,
_ASSERTE(g_pDebugInterface != NULL);
g_pDebugInterface->InitializeLazyDataIfNecessary();
- ETW::MethodLog::SendMethodILToNativeMapEvent(pMethodDesc, ETW::EnumerationLog::EnumerationStructs::JitMethodILToNativeMap, rejitID);
+ ETW::MethodLog::SendMethodILToNativeMapEvent(pMethodDesc, ETW::EnumerationLog::EnumerationStructs::JitMethodILToNativeMap, pCode, rejitID);
}
} EX_CATCH { } EX_END_CATCH(SwallowAllExceptions);
//
// static
-VOID ETW::MethodLog::SendMethodILToNativeMapEvent(MethodDesc * pMethodDesc, DWORD dwEventOptions, ReJITID rejitID)
+VOID ETW::MethodLog::SendMethodILToNativeMapEvent(MethodDesc * pMethodDesc, DWORD dwEventOptions, SIZE_T pCode, ReJITID rejitID)
{
CONTRACTL
{
HRESULT hr = g_pDebugInterface->GetILToNativeMappingIntoArrays(
pMethodDesc,
+ pCode,
kMapEntriesMax,
&cMap,
&rguiILOffset,
// Send any supplemental events requested for this MethodID
if (fSendILToNativeMapEvent)
- ETW::MethodLog::SendMethodILToNativeMapEvent(pMD, dwEventOptions, rejitID);
+ ETW::MethodLog::SendMethodILToNativeMapEvent(pMD, dwEventOptions, codeStart, rejitID);
// When we're called to announce unloads, then the methodunload event itself must
// come after any supplemental events, so that the method unload event is the