[Lldb-commits] [lldb] [lldb] Don't warn that libobjc was read from memory in corefile (PR #127138)

via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 13 14:35:59 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jason Molenda (jasonmolenda)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/127138.diff


1 Files Affected:

- (modified) lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (+3) 


``````````diff
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();
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/127138


More information about the lldb-commits mailing list