From 7ef9cd28c1546e7f2e368ed0215e8e134fab9e4a Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Fri, 22 Nov 2019 13:55:27 -0800 Subject: [PATCH] [automated] Merge branch 'release/2.1' => 'release/2.2' (#27925) * Update CoreClr, CoreFx to servicing-28207-04, servicing-28208-01, respectively (#27899) * update branding for 2.1 (#27914) * Fix GetSequencePoints when profiler provides mapping via SetILInstrumentedCodeMap (#27295) Port #25802 to release/2.1 * Update ILAsmVersion.txt --- src/debug/daccess/dacdbiimpl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp index 712217f3ec3d..0ead5610cf7a 100644 --- a/src/debug/daccess/dacdbiimpl.cpp +++ b/src/debug/daccess/dacdbiimpl.cpp @@ -1002,13 +1002,19 @@ void DacDbiInterfaceImpl::GetSequencePoints(MethodDesc * pMethodDesc, if (!success) ThrowHR(E_FAIL); - // if there is a rejit IL map for this function, apply that in preference to load-time mapping #ifdef FEATURE_REJIT CodeVersionManager * pCodeVersionManager = pMethodDesc->GetCodeVersionManager(); + ILCodeVersion ilVersion; NativeCodeVersion nativeCodeVersion = pCodeVersionManager->GetNativeCodeVersion(dac_cast(pMethodDesc), (PCODE)startAddr); if (!nativeCodeVersion.IsNull()) { - const InstrumentedILOffsetMapping * pRejitMapping = nativeCodeVersion.GetILCodeVersion().GetInstrumentedILMap(); + ilVersion = nativeCodeVersion.GetILCodeVersion(); + } + + // if there is a rejit IL map for this function, apply that in preference to load-time mapping + if (!ilVersion.IsNull() && !ilVersion.IsDefaultVersion()) + { + const InstrumentedILOffsetMapping * pRejitMapping = ilVersion.GetInstrumentedILMap(); ComposeMapping(pRejitMapping, mapCopy, &entryCount); } else