From b248a4f1be6b2127a5e5f528297e19f757d0cbdf Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Mon, 1 Jun 2026 14:07:35 +0200 Subject: [PATCH] [net11.0] Keep R2R debug info in Debug for CoreCLR Apple mobile The .NET SDK defaults PublishReadyToRunStripDebugInfo=true for ios/tvos/ iossimulator/tvossimulator/maccatalyst RIDs, which passes --strip-debug-info to crossgen2 and drops READYTORUN_SECTION_DEBUG_INFO from the composite R2R image. macios additionally defaults PublishReadyToRun=true (composite) for CoreCLR even in Debug, so user code ends up R2R'd with no IL-to-native map. The result under the CoreCLR remote debugger is that DebuggerJitInfo::LazyInitBounds cannot populate m_sequenceMap, line-level breakpoints fail to bind to a native offset, and (without dotnet/runtime#128764) MapILOffsetToNative crashes on a NULL map entry. Default PublishReadyToRunStripDebugInfo=false for CoreCLR apple-mobile Debug builds so the re-composited R2R image keeps debug info and the debugger gets accurate IL-to-native mappings. Release builds are unaffected and still strip. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/targets/Xamarin.Shared.Sdk.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.props b/dotnet/targets/Xamarin.Shared.Sdk.props index fc6465f4c1c0..30e51cea997a 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.props +++ b/dotnet/targets/Xamarin.Shared.Sdk.props @@ -246,6 +246,8 @@ true macho false + + false