https://github.com/jasonmolenda created https://github.com/llvm/llvm-project/pull/127138
AppleObjCRuntimeV2 prints a warning when we read libobjc.A.dylib from memory, as a canary to detect that we are reading system binaries out of memory (which is slow, and we try hard to avoid). But with a corefile, reading out of "memory" is fine, and may be the only way we can find the correct binary. rdar://144322688 >From 3d2befdb4dc42e08e50865faca4d2ef4ab94a300 Mon Sep 17 00:00:00 2001 From: Jason Molenda <jmole...@apple.com> Date: Thu, 13 Feb 2025 14:30:48 -0800 Subject: [PATCH] [lldb] Don't warn that libobjc was read from memory in corefile AppleObjCRuntimeV2 prints a warning when we read libobjc.A.dylib from memory, as a canary to detect that we are reading system binaries out of memory (which is slow, and we try hard to avoid). But with a corefile, reading out of "memory" is fine, and may be the only way we can find the correct binary. rdar://144322688 --- .../ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index a57099f3df454..ff17028e6662a 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -2666,6 +2666,9 @@ void AppleObjCRuntimeV2::WarnIfNoExpandedSharedCache() { if (!object_file->IsInMemory()) return; + if (!GetProcess()->IsLiveDebugSession()) + return; + Target &target = GetProcess()->GetTarget(); Debugger &debugger = target.GetDebugger(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits