2019-05-14 02:31:56 +00:00
|
|
|
.. title:: LLDB Homepage
|
2019-01-30 18:51:40 +00:00
|
|
|
|
2019-05-14 02:31:56 +00:00
|
|
|
The LLDB Debugger
|
|
|
|
=================
|
|
|
|
|
2020-03-02 14:01:55 -08:00
|
|
|
Welcome to the LLDB documentation!
|
2019-01-30 18:51:40 +00:00
|
|
|
|
|
|
|
LLDB is a next generation, high-performance debugger. It is built as a set of
|
2023-08-22 11:41:50 -07:00
|
|
|
reusable components which highly leverage existing libraries in the larger
|
|
|
|
`LLVM Project <https://llvm.org>`_, such as the Clang expression parser and
|
|
|
|
LLVM disassembler.
|
2019-01-30 18:51:40 +00:00
|
|
|
|
2019-03-29 16:12:27 +00:00
|
|
|
LLDB is the default debugger in Xcode on macOS and supports debugging C,
|
2019-01-30 18:51:40 +00:00
|
|
|
Objective-C and C++ on the desktop and iOS devices and simulator.
|
|
|
|
|
2019-05-15 21:58:43 +00:00
|
|
|
All of the code in the LLDB project is available under the
|
|
|
|
`"Apache 2.0 License with LLVM exceptions"`_.
|
|
|
|
|
2019-08-29 07:20:08 +00:00
|
|
|
.. _"Apache 2.0 License with LLVM exceptions": https://llvm.org/docs/DeveloperPolicy.html#new-llvm-project-license-framework
|
2019-01-30 18:51:40 +00:00
|
|
|
|
2019-11-19 08:53:15 -08:00
|
|
|
Using LLDB
|
|
|
|
----------
|
2019-01-30 18:51:40 +00:00
|
|
|
|
2019-11-20 13:46:37 -08:00
|
|
|
For an introduction into the LLDB command language, head over to the `LLDB
|
|
|
|
Tutorial <https://lldb.llvm.org/use/tutorial.html>`_. For users already familiar
|
|
|
|
with GDB there is a cheat sheet listing common tasks and their LLDB equivalent
|
|
|
|
in the `GDB to LLDB command map <https://lldb.llvm.org/use/map.html>`_.
|
|
|
|
|
2023-08-22 10:58:30 -07:00
|
|
|
There are also multiple resources on how to script LLDB using Python: the
|
|
|
|
:doc:`use/python-reference` is a great starting point for that.
|
2019-05-15 21:49:00 +00:00
|
|
|
|
|
|
|
Compiler Integration Benefits
|
|
|
|
-----------------------------
|
|
|
|
|
2019-11-19 08:53:15 -08:00
|
|
|
LLDB converts debug information into Clang types so that it can
|
|
|
|
leverage the Clang compiler infrastructure. This allows LLDB to support the
|
2019-05-15 21:49:00 +00:00
|
|
|
latest C, C++, Objective-C and Objective-C++ language features and runtimes in
|
|
|
|
expressions without having to reimplement any of this functionality. It also
|
|
|
|
leverages the compiler to take care of all ABI details when making functions
|
|
|
|
calls for expressions, when disassembling instructions and extracting
|
|
|
|
instruction details, and much more.
|
|
|
|
|
|
|
|
The major benefits include:
|
|
|
|
|
|
|
|
- Up to date language support for C, C++, Objective-C
|
|
|
|
- Multi-line expressions that can declare local variables and types
|
|
|
|
- Utilize the JIT for expressions when supported
|
|
|
|
- Evaluate expression Intermediate Representation (IR) when JIT can't be used
|
|
|
|
|
|
|
|
Reusability
|
|
|
|
-----------
|
|
|
|
|
|
|
|
The LLDB debugger APIs are exposed as a C++ object oriented interface in a
|
|
|
|
shared library. The lldb command line tool links to, and uses this public API.
|
|
|
|
On macOS the shared library is exposed as a framework named LLDB.framework,
|
2019-11-19 08:53:15 -08:00
|
|
|
and Unix systems expose it as lldb.so. The entire API is also then exposed
|
2019-05-15 21:49:00 +00:00
|
|
|
through Python script bindings which allow the API to be used within the LLDB
|
|
|
|
embedded script interpreter, and also in any python script that loads the
|
|
|
|
lldb.py module in standard python script files. See the Python Reference page
|
|
|
|
for more details on how and where Python can be used with the LLDB API.
|
|
|
|
|
|
|
|
Sharing the LLDB API allows LLDB to not only be used for debugging, but also
|
|
|
|
for symbolication, disassembly, object and symbol file introspection, and much
|
|
|
|
more.
|
|
|
|
|
|
|
|
Platform Support
|
|
|
|
----------------
|
|
|
|
|
|
|
|
LLDB is known to work on the following platforms, but ports to new platforms
|
|
|
|
are welcome:
|
|
|
|
|
2020-07-08 15:30:21 -07:00
|
|
|
* macOS debugging for i386, x86_64 and AArch64
|
|
|
|
* iOS, tvOS, and watchOS simulator debugging on i386, x86_64 and AArch64
|
2019-11-19 08:53:15 -08:00
|
|
|
* iOS, tvOS, and watchOS device debugging on ARM and AArch64
|
2023-03-13 12:01:31 +00:00
|
|
|
* Linux user-space debugging for i386, x86_64, ARM, AArch64, PPC64le, s390x
|
2021-02-20 10:31:42 +01:00
|
|
|
* FreeBSD user-space debugging for i386, x86_64, ARM, AArch64, MIPS64, PPC
|
|
|
|
* NetBSD user-space debugging for i386 and x86_64
|
2021-02-17 08:56:07 +02:00
|
|
|
* Windows user-space debugging for i386, x86_64, ARM and AArch64 (*)
|
2019-05-15 21:49:00 +00:00
|
|
|
|
|
|
|
(*) Support for Windows is under active development. Basic functionality is
|
2021-02-17 08:56:07 +02:00
|
|
|
expected to work, with functionality improving rapidly. ARM and AArch64 support
|
|
|
|
is more experimental, with more known issues than the others.
|
2019-05-15 21:49:00 +00:00
|
|
|
|
|
|
|
Get Involved
|
|
|
|
------------
|
|
|
|
|
2019-08-01 10:33:54 +00:00
|
|
|
Check out the LLVM source-tree with git and find the sources in the `lldb`
|
|
|
|
subdirectory:
|
2019-05-15 21:49:00 +00:00
|
|
|
|
2019-08-01 10:33:54 +00:00
|
|
|
::
|
2019-05-15 21:49:00 +00:00
|
|
|
|
2021-09-04 20:54:32 +05:30
|
|
|
$ git clone https://github.com/llvm/llvm-project.git
|
2019-05-15 21:49:00 +00:00
|
|
|
|
2019-08-01 10:33:54 +00:00
|
|
|
Note that LLDB generally builds from top-of-trunk using CMake and Ninja.
|
|
|
|
Additionally it builds:
|
2019-05-15 21:49:00 +00:00
|
|
|
|
2019-08-01 10:33:54 +00:00
|
|
|
* on macOS with a :ref:`generated Xcode project <CMakeGeneratedXcodeProject>`
|
2019-11-19 08:53:15 -08:00
|
|
|
* on Linux and FreeBSD with Clang and libstdc++/libc++
|
|
|
|
* on NetBSD with GCC/Clang and libstdc++/libc++
|
2019-08-01 10:33:54 +00:00
|
|
|
* on Windows with a generated project for VS 2017 or higher
|
|
|
|
|
|
|
|
See the :doc:`LLDB Build Page <resources/build>` for build instructions.
|
2019-05-15 21:49:00 +00:00
|
|
|
|
2022-03-23 10:10:20 -04:00
|
|
|
Discussions about LLDB should go to the `LLDB forum
|
2023-10-23 18:20:27 +01:00
|
|
|
<https://discourse.llvm.org/c/subprojects/lldb>`__ or the ``lldb`` channel on
|
2023-11-10 11:17:17 +00:00
|
|
|
the `LLVM Discord server <https://discord.com/invite/xS7Z362>`__.
|
2023-10-23 18:20:27 +01:00
|
|
|
|
|
|
|
For contributions follow the
|
|
|
|
`LLVM contribution process <https://llvm.org/docs/Contributing.html>`__. Commit
|
2019-08-01 10:33:54 +00:00
|
|
|
messages are automatically sent to the `lldb-commits
|
2023-10-23 18:20:27 +01:00
|
|
|
<http://lists.llvm.org/mailman/listinfo/lldb-commits>`__ mailing list.
|
2019-05-15 21:49:00 +00:00
|
|
|
|
2023-08-18 11:18:24 -07:00
|
|
|
See the :doc:`Projects page <resources/projects>` if you are looking for some
|
2019-08-01 10:33:54 +00:00
|
|
|
interesting areas to contribute to lldb.
|
2019-01-30 18:51:40 +00:00
|
|
|
|
|
|
|
.. toctree::
|
2019-05-15 21:49:00 +00:00
|
|
|
:hidden:
|
2019-01-30 18:51:40 +00:00
|
|
|
:maxdepth: 1
|
2023-08-18 11:18:24 -07:00
|
|
|
:caption: Using LLDB
|
2019-01-30 18:51:40 +00:00
|
|
|
|
|
|
|
use/tutorial
|
|
|
|
use/map
|
|
|
|
use/formatting
|
|
|
|
use/variable
|
|
|
|
use/symbolication
|
|
|
|
use/symbols
|
|
|
|
use/remote
|
2020-10-06 12:27:27 +05:00
|
|
|
use/qemu-testing
|
2022-03-19 22:19:13 +05:30
|
|
|
use/intel_pt
|
2022-06-09 09:13:00 -07:00
|
|
|
use/ondemand
|
2023-10-20 14:06:06 +01:00
|
|
|
use/aarch64-linux
|
2019-01-30 18:51:40 +00:00
|
|
|
use/troubleshooting
|
2020-10-20 11:42:09 -07:00
|
|
|
use/links
|
2023-08-18 11:18:24 -07:00
|
|
|
Man Page <man/lldb>
|
2019-01-30 18:51:40 +00:00
|
|
|
|
|
|
|
.. toctree::
|
2019-05-15 21:49:00 +00:00
|
|
|
:hidden:
|
2019-01-30 18:51:40 +00:00
|
|
|
:maxdepth: 1
|
2023-08-18 11:18:24 -07:00
|
|
|
:caption: Scripting LLDB
|
2020-10-02 12:56:38 -07:00
|
|
|
|
2023-08-18 11:18:24 -07:00
|
|
|
use/python
|
|
|
|
use/python-reference
|
|
|
|
Python API <python_api>
|
2020-10-02 12:56:38 -07:00
|
|
|
|
|
|
|
|
2019-05-15 21:49:00 +00:00
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
|
|
|
:maxdepth: 1
|
2023-08-18 11:18:24 -07:00
|
|
|
:caption: Developing LLDB
|
2019-04-22 22:41:55 +00:00
|
|
|
|
2023-08-18 11:18:24 -07:00
|
|
|
resources/overview
|
|
|
|
resources/contributing
|
|
|
|
resources/build
|
|
|
|
resources/test
|
2023-09-06 16:22:28 +01:00
|
|
|
resources/debugging
|
2023-08-18 11:18:24 -07:00
|
|
|
resources/fuzzing
|
|
|
|
resources/sbapi
|
2023-09-15 11:15:13 -07:00
|
|
|
resources/dataformatters
|
2023-08-18 11:18:24 -07:00
|
|
|
resources/extensions
|
2024-04-24 09:25:32 +01:00
|
|
|
resources/lldbgdbremote
|
2023-08-18 11:18:24 -07:00
|
|
|
resources/caveats
|
|
|
|
resources/projects
|
2020-01-03 13:59:08 -08:00
|
|
|
Public C++ API <https://lldb.llvm.org/cpp_reference/namespacelldb.html>
|
|
|
|
Private C++ API <https://lldb.llvm.org/cpp_reference/index.html>
|
2019-04-22 22:41:55 +00:00
|
|
|
|
2019-05-15 21:49:00 +00:00
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
|
|
|
:maxdepth: 1
|
|
|
|
:caption: External Links
|
2019-01-30 18:51:40 +00:00
|
|
|
|
2019-10-28 11:14:49 -07:00
|
|
|
Source Code <https://github.com/llvm/llvm-project>
|
2023-08-18 11:18:24 -07:00
|
|
|
Releases <https://github.com/llvm/llvm-project/releases>
|
2023-08-18 13:52:22 -07:00
|
|
|
Discussion Forums <https://discourse.llvm.org/c/subprojects/lldb/8>
|
2023-08-22 11:41:50 -07:00
|
|
|
Developer Policy <https://llvm.org/docs/DeveloperPolicy.html>
|
2023-09-08 09:53:52 +00:00
|
|
|
Bug Reports <https://github.com/llvm/llvm-project/issues?q=is%3Aissue+label%3Alldb+is%3Aopen>
|
|
|
|
Code Reviews <https://github.com/llvm/llvm-project/pulls?q=is%3Apr+label%3Alldb+is%3Aopen>
|