[swift-lldb-dev] swift-lldb release branches

Francis Ricci francisjricci at gmail.com
Mon Sep 25 13:33:10 CDT 2017


Currently, as a super basic test, I'm just using:

swift/utils/build-script --build-swift-stdlib-unittest-extra -T -d --lldb

With matching release branches (either 3.1 or 4.0) checked out in
llvm, swift, clang, and lldb. That should ensure that everybody is
matching in terms of ABI/version. I'm then running lldb with a test
binary compiled as part of that build script invocation (that compiles
stdlib and validation tests for swift).

On Mon, Sep 25, 2017 at 2:22 PM, Jim Ingham <jingham at apple.com> wrote:
> I can't quite tell from the your description, but the first thing to note about using lldb for swift is that at present the debug information format for swift is the swift module file which is highly dependent on the layout of objects in the swift compiler.  So you have to build your binaries using the toolchain you built as part of building lldb.  If you are doing this all by hand to play around, you can just point at the compiler you've built (the lldb test suite does this automatically for all the tests it runs internally.)
>
> Or you can build a swift toolchain and install and use that.
>
> The crucial bit is that you have to use the exact same swift version for building and debugging.
>
> Jim
>
>
>> On Sep 25, 2017, at 9:55 AM, Francis Ricci via swift-lldb-dev <swift-lldb-dev at swift.org> wrote:
>>
>> Is swift-lldb only actively supported for debugging xcode projects?
>> Swift in general is cross platform (runs on windows, linux, android,
>> etc), and I don't generally target iOS or use Xcode. I'd very much
>> like to get non-iOS non-Xcode debugging up and running, and I'm
>> curious what the current status there is expected to be.
>>
>> On Fri, Sep 22, 2017 at 4:28 PM, Greg Clayton <clayborg at gmail.com> wrote:
>>> It adds a BUNCH of command line options to the compile that makes things work.. So I would suggest building a simple example with it and watching the compile options and the linker options and all of them are very important... I gave up on doing manual builds because of this and I let Xcode do it.
>>>
>>> At the very least you can have your build system just call "xcodebuild -configuration Debug" or "xcodebuild -configuration Release".
>>>
>>> Try using an Xcode project and see if debugging works.
>>>
>>> Greg
>>>> On Sep 22, 2017, at 1:24 PM, Francis Ricci <francisjricci at gmail.com> wrote:
>>>>
>>>> Nope, was using Ninja. Is Xcode required?
>>>>
>>>> On Fri, Sep 22, 2017 at 4:23 PM, Greg Clayton <clayborg at gmail.com> wrote:
>>>>> Are you building your Swift code with Xcode?
>>>>>
>>>>>> On Sep 22, 2017, at 12:40 PM, Francis Ricci <francisjricci at gmail.com> wrote:
>>>>>>
>>>>>> This is the message I sent to the list yesterday.
>>>>>>
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: Francis Ricci <francisjricci at gmail.com>
>>>>>> Date: Thu, Sep 21, 2017 at 3:59 PM
>>>>>> Subject: swift-lldb release branches
>>>>>> To: swift-lldb-dev at swift.org
>>>>>>
>>>>>>
>>>>>> Hi all!
>>>>>>
>>>>>> I'm getting started doing some development on swift-lldb, and I'm
>>>>>> having trouble getting basic debugging functionality out of the lldb
>>>>>> binaries I build off of the swift release branches (swift-3.1-branch
>>>>>> and swift-4.0-branch). On both branches, when I run lldb against a
>>>>>> stdlib unit test binary (tried Stdin.swift and TestDate.swift), even
>>>>>> breakpoints don't work. With a swift binary built in debug mode, line
>>>>>> number breakpoints don't get set, and function name breakpoints get
>>>>>> set but not hit. In release mode, lldb hits an illegal instruction in
>>>>>> the test and the test crashes.
>>>>>>
>>>>>> I'm building in a pretty vanilla way, just using build-script --lldb
>>>>>> on a mac, wondering if I'm missing some important setup (or whether I
>>>>>> should be on a different branch). I care about abi stability with a
>>>>>> swift compiler built on the release branches, so I don't think I can
>>>>>> run off of master or stable.
>>>>>>
>>>>>> Francis
>>>>>
>>>
>> _______________________________________________
>> swift-lldb-dev mailing list
>> swift-lldb-dev at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>


More information about the swift-lldb-dev mailing list