1.. title:: LLDB Homepage 2 3The LLDB Debugger 4================= 5 6Welcome to the LLDB documentation! 7 8LLDB is a next generation, high-performance debugger. It is built as a set of 9reusable components which highly leverage existing libraries in the larger LLVM 10Project, such as the Clang expression parser and LLVM disassembler. 11 12LLDB is the default debugger in Xcode on macOS and supports debugging C, 13Objective-C and C++ on the desktop and iOS devices and simulator. 14 15All of the code in the LLDB project is available under the 16`"Apache 2.0 License with LLVM exceptions"`_. 17 18.. _"Apache 2.0 License with LLVM exceptions": https://llvm.org/docs/DeveloperPolicy.html#new-llvm-project-license-framework 19 20Using LLDB 21---------- 22 23For an introduction into the LLDB command language, head over to the `LLDB 24Tutorial <https://lldb.llvm.org/use/tutorial.html>`_. For users already familiar 25with GDB there is a cheat sheet listing common tasks and their LLDB equivalent 26in the `GDB to LLDB command map <https://lldb.llvm.org/use/map.html>`_. 27 28There are also multiple resources on how to script LLDB using Python `Python 29Reference <https://lldb.llvm.org/use/python-reference.html>`_ is a great 30starting point for that. 31 32Compiler Integration Benefits 33----------------------------- 34 35LLDB converts debug information into Clang types so that it can 36leverage the Clang compiler infrastructure. This allows LLDB to support the 37latest C, C++, Objective-C and Objective-C++ language features and runtimes in 38expressions without having to reimplement any of this functionality. It also 39leverages the compiler to take care of all ABI details when making functions 40calls for expressions, when disassembling instructions and extracting 41instruction details, and much more. 42 43The major benefits include: 44 45- Up to date language support for C, C++, Objective-C 46- Multi-line expressions that can declare local variables and types 47- Utilize the JIT for expressions when supported 48- Evaluate expression Intermediate Representation (IR) when JIT can't be used 49 50Reusability 51----------- 52 53The LLDB debugger APIs are exposed as a C++ object oriented interface in a 54shared library. The lldb command line tool links to, and uses this public API. 55On macOS the shared library is exposed as a framework named LLDB.framework, 56and Unix systems expose it as lldb.so. The entire API is also then exposed 57through Python script bindings which allow the API to be used within the LLDB 58embedded script interpreter, and also in any python script that loads the 59lldb.py module in standard python script files. See the Python Reference page 60for more details on how and where Python can be used with the LLDB API. 61 62Sharing the LLDB API allows LLDB to not only be used for debugging, but also 63for symbolication, disassembly, object and symbol file introspection, and much 64more. 65 66Platform Support 67---------------- 68 69LLDB is known to work on the following platforms, but ports to new platforms 70are welcome: 71 72* macOS debugging for i386, x86_64 and AArch64 73* iOS, tvOS, and watchOS simulator debugging on i386, x86_64 and AArch64 74* iOS, tvOS, and watchOS device debugging on ARM and AArch64 75* Linux user-space debugging for i386, x86_64 and PPC64le 76* FreeBSD user-space debugging for i386 and x86_64 77* Windows user-space debugging for i386 (*) 78 79(*) Support for Windows is under active development. Basic functionality is 80expected to work, with functionality improving rapidly. 81 82Get Involved 83------------ 84 85Check out the LLVM source-tree with git and find the sources in the `lldb` 86subdirectory: 87 88:: 89 90 > git clone https://github.com/llvm/llvm-project.git 91 92Note that LLDB generally builds from top-of-trunk using CMake and Ninja. 93Additionally it builds: 94 95* on macOS with a :ref:`generated Xcode project <CMakeGeneratedXcodeProject>` 96* on Linux and FreeBSD with Clang and libstdc++/libc++ 97* on NetBSD with GCC/Clang and libstdc++/libc++ 98* on Windows with a generated project for VS 2017 or higher 99 100See the :doc:`LLDB Build Page <resources/build>` for build instructions. 101 102Discussions about LLDB should go to the `lldb-dev 103<http://lists.llvm.org/mailman/listinfo/lldb-dev>`__ mailing list. Commit 104messages are automatically sent to the `lldb-commits 105<http://lists.llvm.org/mailman/listinfo/lldb-commits>`__ mailing list , and 106this is also the preferred mailing list for patch submissions. 107 108See the :doc:`Projects page <status/projects>` if you are looking for some 109interesting areas to contribute to lldb. 110 111.. toctree:: 112 :hidden: 113 :maxdepth: 1 114 :caption: Project 115 116 status/goals 117 status/features 118 status/status 119 status/projects 120 status/releases 121 122.. toctree:: 123 :hidden: 124 :maxdepth: 1 125 :caption: Use & Extension 126 127 use/tutorial 128 use/map 129 use/formatting 130 use/variable 131 use/symbolication 132 use/symbols 133 use/python 134 use/python-reference 135 use/remote 136 use/qemu-testing 137 use/troubleshooting 138 use/links 139 140.. toctree:: 141 :hidden: 142 :maxdepth: 1 143 :caption: Development 144 145 resources/contributing 146 resources/build 147 resources/test 148 resources/bots 149 resources/caveats 150 151 152.. toctree:: 153 :hidden: 154 :maxdepth: 1 155 :caption: Design 156 157 design/overview 158 design/reproducers 159 design/structureddataplugins 160 design/sbapi 161 162.. toctree:: 163 :hidden: 164 :maxdepth: 1 165 :caption: Reference 166 167 Public Python API <https://lldb.llvm.org/python_reference/index.html> 168 Public C++ API <https://lldb.llvm.org/cpp_reference/namespacelldb.html> 169 Private C++ API <https://lldb.llvm.org/cpp_reference/index.html> 170 Man Page <man/lldb> 171 172.. toctree:: 173 :hidden: 174 :maxdepth: 1 175 :caption: External Links 176 177 Source Code <https://github.com/llvm/llvm-project> 178 Code Reviews <https://reviews.llvm.org> 179 Bug Reports <https://bugs.llvm.org/> 180