[swift-users] LLDB module import paths
dmishe at google.com
Mon Aug 22 16:08:13 CDT 2016
We build Swift code in a location different from where sources live and
having a bunch of issues with LLDB in such a setup.
One of the problems is LLDB not being able to import the modules referenced
from binaries we build:
error: Error in auto-import:
failed to get module '<module name>' from AST context
It looks like LLDB gets module search paths from a few sources:
1. The compiler command line stored into DWARF. We could add a -I flag
here, like SPM does, but our paths are all relative. And Xcode starts LLDB
with CWD = /. This does not work in principle.
2. There's the target.swift-module-search-paths setting. But it does not
work in my experimentation, I suspect this is because it feeds into
framework search paths, as evidenced here
Is that a bug or intentional?
3. Anything else? Is there a flag similar to -compilation-dir flag on GDB
that would root all of the relative paths found in DWARF/modules to a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users