[swift-lldb-dev] Issues with LLDB and modules
Dmitry Shevchenko
dmishe at google.com
Fri Sep 9 13:04:02 CDT 2016
Hello, I would like to ask a couple of implementation questions about LLDB
and Swift.
We are building swift in a custom build system (bazel.org) where we try to
use Swift static libraries to compose our programs. In other words, we
build multiple Swift targets into a pair of (.a, .switfmodule) and then
link static libraries together into the final executable.
It works pretty well, but there are issues when it comes to debugging.
Ideally, we would like to debug with and without dSYM to speedup
compilations.
>From reading SwiftASTContext.cpp, it looks like LLDB needs to load the
corresponding .swiftmodule to work.
It does so by looking at the AST tag in the symbol table of the executable.
Is this correct, or is there another way that LLDB can find the module?
Additionally, there can only be one such tag, since LLDB reads the first
one it finds and stops.
However, if a program is composed from multiple modules, it's not possible
to tell the debugger to load them all. For example, if the app is written
mostly in ObjC, but has multiple helper Swift libraries where each has its
own module, and those modules do not import each other (so there's no clear
way to say what is the "main" module), how would we tell LLDB to load all
of them?
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-lldb-dev/attachments/20160909/981c42e5/attachment.html>
More information about the swift-lldb-dev
mailing list