Use libobjc.A.dylib as a sentinel to detect situations where we're reading libraries from memory instead of the shared cache.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2361–2362 | Let's bikeshed about the wording! |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2377 | Here's my take: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the the on-disk %s shared cache for this device. This will likely reduce debugging performance. |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2379 | I would replace we with LLDB. Users might see this in their IDE's console and not even know who we is. |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2359 | Why is this code #ifdef APPLE? If you were debugging from a Linux machine to a macOS system, wouldn't you also want to at least see the warning so you would know why their session was slow? |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2379 | Good point! |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2359 | My reasoning was that the error wouldn't be actionable so I'd rather not show it all. I don't feel strongly about it though. |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2359 | It would save people wasting time to try to figure out why this seemed slow, which is worth something on its own. And the Linux user could expand the cache on the Mac, copy it over and lldb should be able to use it - with "target modules add" by hand if nothing more automatic works. |
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | ||
---|---|---|
2359 | Fair enough! |
Why is this code #ifdef APPLE?
If you were debugging from a Linux machine to a macOS system, wouldn't you also want to at least see the warning so you would know why their session was slow?