xref: /openbsd/gnu/llvm/lldb/docs/index.rst (revision 4bdff4be)
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, ARM, AArch64, MIPS64, PPC64le,
76  s390x
77* FreeBSD user-space debugging for i386, x86_64, ARM, AArch64, MIPS64, PPC
78* NetBSD user-space debugging for i386 and x86_64
79* Windows user-space debugging for i386, x86_64, ARM and AArch64 (*)
80
81(*) Support for Windows is under active development. Basic functionality is
82expected to work, with functionality improving rapidly. ARM and AArch64 support
83is more experimental, with more known issues than the others.
84
85Get Involved
86------------
87
88Check out the LLVM source-tree with git and find the sources in the `lldb`
89subdirectory:
90
91::
92
93  $ git clone https://github.com/llvm/llvm-project.git
94
95Note that LLDB generally builds from top-of-trunk using CMake and Ninja.
96Additionally it builds:
97
98* on macOS with a :ref:`generated Xcode project <CMakeGeneratedXcodeProject>`
99* on Linux and FreeBSD with Clang and libstdc++/libc++
100* on NetBSD with GCC/Clang and libstdc++/libc++
101* on Windows with a generated project for VS 2017 or higher
102
103See the :doc:`LLDB Build Page <resources/build>` for build instructions.
104
105Discussions about LLDB should go to the `LLDB forum
106<https://discourse.llvm.org/c/subprojects/lldb>`__. Commit
107messages are automatically sent to the `lldb-commits
108<http://lists.llvm.org/mailman/listinfo/lldb-commits>`__ mailing list, and
109this is also the preferred mailing list for patch submissions.
110
111See the :doc:`Projects page <status/projects>` if you are looking for some
112interesting areas to contribute to lldb.
113
114.. toctree::
115   :hidden:
116   :maxdepth: 1
117   :caption: Project
118
119   status/goals
120   status/features
121   status/status
122   status/projects
123   status/releases
124
125.. toctree::
126   :hidden:
127   :maxdepth: 1
128   :caption: Use & Extension
129
130   use/tutorial
131   use/map
132   use/formatting
133   use/variable
134   use/symbolication
135   use/symbols
136   use/extensions
137   use/python
138   use/python-reference
139   use/remote
140   use/qemu-testing
141   use/intel_pt
142   use/ondemand
143   use/troubleshooting
144   use/links
145
146.. toctree::
147   :hidden:
148   :maxdepth: 1
149   :caption: Development
150
151   resources/contributing
152   resources/build
153   resources/test
154   resources/fuzzing
155   resources/bots
156   resources/caveats
157
158
159.. toctree::
160   :hidden:
161   :maxdepth: 1
162   :caption: Design
163
164   design/overview
165   design/sbapi
166
167.. toctree::
168   :hidden:
169   :maxdepth: 1
170   :caption: Reference
171
172   Public Python API <python_api>
173   Public C++ API <https://lldb.llvm.org/cpp_reference/namespacelldb.html>
174   Private C++ API <https://lldb.llvm.org/cpp_reference/index.html>
175   Man Page <man/lldb>
176
177.. toctree::
178   :hidden:
179   :maxdepth: 1
180   :caption: External Links
181
182   Source Code <https://github.com/llvm/llvm-project>
183   Code Reviews <https://reviews.llvm.org>
184   Bug Reports <https://github.com/llvm/llvm-project/issues/labels/lldb/>
185