[Lldb-commits] [PATCH] D92187: [lldb] [POSIX-DYLD] Add libraries from initial rendezvous brkpt hit

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 14 04:13:24 PST 2020

labath added a comment.

In D92187#2451013 <https://reviews.llvm.org/D92187#2451013>, @mgorny wrote:

> In D92187#2450976 <https://reviews.llvm.org/D92187#2450976>, @labath wrote:
>> In D92187#2450526 <https://reviews.llvm.org/D92187#2450526>, @mgorny wrote:
>>> Another fix: we should only unload duplicate ld.so if it's actually a duplicate, i.e. the path differs. Otherwise, we've ended up unloading the only copy.
>> Would comparing the module shared_pointers work? I think that's exactly what we want here. I think it's possible for `LoadModuleAtAddress` to return the same module, even with paths which don't match exactly. But if it does that, then we will still end up unloading the original interpreter module...
> How do you suggest we get the shared pointer for comparison? Store in class instance, or search for it somehow?

Store in the class (probably as a weak_ptr), just like you did with the path....



More information about the lldb-commits mailing list