Hi! I noticed recently that when using the host platform with an sdk sysroot set, modules are not resolved using a path prefixed by the set sysroot path.
Backstory: I'm trying to debug production coredumps on a development machine using a sysroot folder tree that contains *all* of the required shared objects required to run the binary.
An example sysroot tree would be:
/tmp/debug-[snip]-coredump.1869466.bL8C/sysroot ├── this_is_a │ └── dummy │ └── path │ └── libsomething.so └── lib64 │ └── libother.so
In gdb, I use this via set sysroot /path/to/sysroot.
In LLDB, I assume I should do something like platform select host -S /path/to/sysroot.
After doing either of these I would expect the attempted paths for loading shared objects will be prefixed by the configured sysroot.
Unfortunately, when using the host platform, it currently ignores the sysroot configuration option when trying to load shared objects.
This breaks the sysroot setting on the host platform.
I believe these lines would be okay to remove because it falls back to normal resolution.
If I'm just doing something wrong let me know too :)
Let me know if you want me to clarify anything!
Thanks!
(Can happily add a test, but I wanted to make sure my approach was valid from the experts (ie you!) beforehand)