clayborg added a comment.

In https://reviews.llvm.org/D49685#1173720, @EugeneBi wrote:

> In https://reviews.llvm.org/D49685#1173640, @clayborg wrote:
>
> > We should never be loading the wrong shared libraries. The module spec we 
> > fill out must contain the UUID of the file are looking for. If it doesn't 
> > we have no chance of every really loading the right stuff.
>
>
> Well, that's what it does on my machine. So prepending sysroot *after* trying 
> to load module without it will cause problems to me. Also, I assume that if 
> you specified sysroot for a platform, we should not try to load solibs 
> without it - these paths are just not a part of the platform.
>
> > I think doing this in the module list is not the right place. Why? Some 
> > platforms might have multiple sysroot to check. iOS for instance has a 
> > directory for each device that Xcode has connected to which can be checked. 
> > I am fine with adding this ability to>  lldb_private::Platform, but I would 
> > just do it in there. Try GetRemoteSharedModule with the spec, if it fails, 
> > try again after modifying the spec to prepend the sysroot path. Possible 
> > even just check the sysroot path + path first if m_sdk_sysroot is filled 
> > in. I don't see the need to change ModuleList itself.
>
> I do not see how this prepend sysroot could be done in the platform... 
> Essentially, my fix is doing what you suggest: the platform supplies sysroot 
> to the module list, and two different platforms (for two XCode devices, etc.) 
> would supply different sysroots. What do I miss?


You would just move:

  auto resolved_module_spec(module_spec);
    if (sysroot != nullptr)
      resolved_module_spec.GetFileSpec().PrependPathComponent(sysroot);

into the code in Platform.cpp and do it all there.


Repository:
  rL LLVM

https://reviews.llvm.org/D49685



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to