This is the version of LLDB that supports the Swift programming language & REPL.
C++ HTML Python Swift C CMake Other
Latest commit 4b2d389 Jan 11, 2017 @llvm-beanz llvm-beanz committed on GitHub Merge pull request #118 from llvm-beanz/CMake-Patches-From-Upstream
Merge CMake patches from upstream
Failed to load latest commit information.
cmake [CMake] Fix install rules for tools included in the framework Jan 11, 2017
docs Merge remote-tracking branch 'origin/upstream' into upstream-merge Sep 10, 2016
examples reformat of swift-lldb master-next Sep 7, 2016
include/lldb Fixed a crasher that has been borking out heap for a long time. Dec 8, 2016
lit [CMake] Connect testing swift with in-tree compiler Dec 3, 2016
lldb.xcodeproj specify -DNDEBUG for BNI builds of all targets in the Xcode build Dec 21, 2016
lldb.xcworkspace [FoundationValueTypes] Address code review comments Jun 15, 2016
packages/Python/lldbsuite Updated the XCTest support to handle the correct executable names. Dec 20, 2016
resources Merge remote-tracking branch 'origin/upstream' into master-next Apr 6, 2016
scripts Merge pull request #101 from llvm-beanz/cmake-build-and-test-darwin Dec 5, 2016
source [CMake] Only support LLDB_BUILD_FRAMEWORK on CMake 3.7 and later Jan 11, 2017
test [CMake] Only support LLDB_BUILD_FRAMEWORK on CMake 3.7 and later Jan 11, 2017
third_party/Python/module grand code reformatting Sep 8, 2016
tools [CMake] Refactor LLDB libraries and tools to be components Jan 11, 2017
unittests Fix a bug where the EmulateInstructionARM64 handling of STP/LDP instr… Nov 15, 2016
utils grand code reformatting Sep 8, 2016
www Fix up the formats.html for the addition of the thread-stop-format. Dec 1, 2016
.arcconfig Upgrade all the .arcconfigs to https. Jul 14, 2016
.clang-format Updated .clang-format rules so bring LLDB in line with LLVM standards. Sep 8, 2016
.gitignore Revert "Revert "Merge pull request #71 from tfiala/master-next-merge"" Nov 3, 2016
CMakeLists.txt [CMake] Ensure Python files are inside the LLDB framework bundle Jan 11, 2017
CODE_OWNERS.txt Switch linux and android CODE_OWNERS Aug 26, 2016 Add legal notice for pull requests and reference to contribution guid… Dec 5, 2015
EXPORT.APPLE Add Swift support to LLDB. Nov 6, 2015
INSTALL.txt Revert the patch to Test Commit Access Jul 6, 2015
LICENSE.TXT test commit Jun 9, 2010 Added CI status and links to, mirroring the main Swift project Jul 8, 2016
notifications.json Add Swift support to LLDB. Nov 6, 2015 grand code reformatting Sep 8, 2016

Swift Debugger and REPL

macOS Build Status
Ubuntu 14.04 Build Status
Ubuntu 15.10 Build Status

Welcome to the Swift Debugger and REPL!

Swift is a new, high performance systems programming language. It has a clean and modern syntax, offers seamless access to existing C and Objective-C code and frameworks, and is memory safe (by default).

This repository covers the Swift Debugger and REPL support, built on top of the LLDB Debugger.

Building LLDB for Swift

To build LLDB for Swift, you must have the following prerequisites installed on your development system:

  • OS X Requirements

  • Linux x86_64 (Ubuntu 14.04, Ubuntu 15.10)

    • Clang 3.5 or later.

    • Cmake (version or later)

    • Python 2.7

Once the pre-requisites are satisfied, follow these steps from a bash-like shell:

mkdir myswift
cd myswift
git clone lldb
lldb/scripts/ --test

The lldb build script will clone additional repositories for required dependencies if they are not already present. An optional --update argument can be used to refresh these required repositories. Products of the build process will be placed in the build/ directory under the root source directory.

Inter-project Directory Layout

LLDB for Swift introduces new dependencies that do not exist with core LLDB. In particular, LLDB for Swift makes extensive use of the Swift codebase.

Each one of the directories listed below underneath the overall source_root are backed by a repository:

+-- clang/
+-- cmark/
+-- lldb/
+-- llvm/
+-- ninja/
+-- swift/

Details on the contents:

  • clang

    Contains the stable version of Clang used by Swift.

  • cmark

    Contains markdown support used by Swift.

  • lldb

    Contains the LLDB source that includes Swift support. All of LLDB for Swift is contained in this repository. Core LLDB contents are merged into this repository. No other copy of LLDB source code is required.

  • llvm

    Contains the stable version of LLVM used by Swift.

  • ninja

    Contains the Ninja build system.

  • swift

    Contains the Swift Language and Swift Runtime code.

Note: If you don't use the script to do the initial clone of the related project repositories, you'll need to manually clone them to the names above:

Contribution Subtleties

The swift-lldb project enhances the core LLDB project developed under the LLVM Project. Swift support in the debugger is added via the existing source-level plugin infrastructure, isolated to files that are newly introduced in the lldb-swift repository.

Files that come from the core LLDB project can be readily identified by their use of the LLVM comment header. As no local changes should be made to any of these files, follow the standard guidance for upstream changes.