Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


This is the version of LLDB that supports the Swift programming language & REPL.

Subscribe to updates I use swift-lldb

Statistics on swift-lldb

Number of watchers on Github 471
Number of open issues 7
Main language C++
Average time to merge a PR 1 day
Open pull requests 36+
Closed pull requests 34+
Last commit almost 2 years ago
Repo Created over 4 years ago
Repo Last Updated almost 2 years ago
Size 129 MB
Organization / Authorapple
Page Updated
Do you use swift-lldb? Leave a review!
View open issues (7)
View swift-lldb activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating swift-lldb for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Swift Debugger and REPL

macOS Build Status
Ubuntu 16.04 Build Status
Ubuntu 16.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:

  • macOS Requirements

    • macOS 10.12.6 or later.
    • Xcode 9.2 or later.
    • Cmake (version or later)
  • 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.

swift-lldb open pull requests (View All Pulls)
  • Update README URLs based on HTTP redirects
  • Support Linux on z as a Swift platform
  • [CMake] Fix LLDB in-tree build
  • [CMake] Search for llvm-config in LLDB_PATH_TO_LLVM_BUILD only
  • Merge r284565 into master-next from upstream
  • Remove weak-linked symbols for SBBreakpointListImpl
  • Cleanup version printing
  • Updated SwiftASTContext to find a single module with Swift flags.
  • use HTTPS instead of SSH to clone Github repositories
  • Makes VALID_OR_* failed asserts print error before dying.
  • Cmake framework install
  • Use DeclNames instead of Identifiers in more places and consider special DeclNames
  • Port swift-lldb to Windows
  • disable data tests until SR-3320 can be addressed
  • [Swift] Add a test for the target.swift-framework-search-paths setting
  • Adjust to return type change of getBaseName in main swift repo
  • Adopt changes for special names in the swift repository
  • SR-100. Ask Python where platform specific lib dir is.
  • Adapt lldb to the new swift weak reference representation.
  • Merge into stable: [lldb] Add support for "external" reports in ThreadSanitizer LLDB plugin
  • Manually merged the contents on master-next into master.
  • Allow .swift_ast ELF section to be stored in external debug info
  • When parsing the DBGSourcePathRemapping plist entries
  • Extended the CFNumber data formatter to handle High Sierra.
  • [build-swift-cmake] Genericizes build script for use on Windows
  • [SwiftLanguageRuntime] Fail when we can't retrieve the type.
  • lldb running on an ios device is using the _dyld_get_all_image_infos()
  • [Playground] Replaced "$builtin" with "__builtin" in the playground preamble.
  • [Batch Mode] WIP: Pass PrimarySpecificPaths to createEmptyModule and IRGenModule()
  • [ExpressionParser] swiftc change: OwnershipAttr -> ReferenceOwnershipAttr.
  • [PATCH] [test] Introduce the skipUnlessSwiftPR decorator
  • Fall back to compile flags when serialized debugging options are missing
  • SR-2100 - Add support for multi-lib systems
  • [SwiftLangRuntime] Garbage collect now dead code (after recent changes).
  • Swift: Disable headermap include paths in Swift's ClangImporter by de
  • Fix swift AST section name for COFF objects
swift-lldb questions on Stackoverflow (View All Questions)
  • Swift LLDB is not changing values / has no effect
swift-lldb list of languages used
Other projects in C++