brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.7 KiB · a981c0a Raw
193 lines · plain
1.. title:: LLDB Homepage2 3The LLDB Debugger4=================5 6Welcome to the LLDB documentation!7 8LLDB is a next generation, high-performance debugger. It is built as a set of9reusable components which highly leverage existing libraries in the larger10`LLVM Project <https://llvm.org>`_, such as the Clang expression parser and11LLVM disassembler.12 13LLDB is the default debugger in Xcode on macOS and supports debugging C,14Objective-C and C++ on the desktop and iOS devices and simulator.15 16All of the code in the LLDB project is available under the17`"Apache 2.0 License with LLVM exceptions"`_.18 19.. _"Apache 2.0 License with LLVM exceptions": https://llvm.org/docs/DeveloperPolicy.html#new-llvm-project-license-framework20 21Using LLDB22----------23 24For an introduction into the LLDB command language, head over to the `LLDB25Tutorial <https://lldb.llvm.org/use/tutorial.html>`_. For users already familiar26with GDB there is a cheat sheet listing common tasks and their LLDB equivalent27in the `GDB to LLDB command map <https://lldb.llvm.org/use/map.html>`_.28 29There are also multiple resources on how to script LLDB using Python: the30:doc:`use/python-reference` is a great starting point for that.31 32Compiler Integration Benefits33-----------------------------34 35LLDB converts debug information into Clang types so that it can36leverage the Clang compiler infrastructure. This allows LLDB to support the37latest C, C++, Objective-C and Objective-C++ language features and runtimes in38expressions without having to reimplement any of this functionality. It also39leverages the compiler to take care of all ABI details when making functions40calls for expressions, when disassembling instructions and extracting41instruction details, and much more.42 43The major benefits include:44 45- Up to date language support for C, C++, Objective-C46- Multi-line expressions that can declare local variables and types47- Utilize the JIT for expressions when supported48- Evaluate expression Intermediate Representation (IR) when JIT can't be used49 50Reusability51-----------52 53The LLDB debugger APIs are exposed as a C++ object oriented interface in a54shared 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 exposed57through Python script bindings which allow the API to be used within the LLDB58embedded script interpreter, and also in any python script that loads the59lldb.py module in standard python script files. See the Python Reference page60for 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 also63for symbolication, disassembly, object and symbol file introspection, and much64more.65 66Platform Support67----------------68 69LLDB is known to work on the following platforms, but ports to new platforms70are welcome:71 72* macOS debugging for i386, x86_64 and AArch6473* iOS, tvOS, and watchOS simulator debugging on i386, x86_64 and AArch6474* iOS, tvOS, and watchOS device debugging on ARM and AArch6475* Linux user-space debugging for i386, x86_64, ARM, AArch64, PPC64le, s390x76* FreeBSD user-space debugging for i386, x86_64, ARM, AArch64, MIPS64, PPC77* NetBSD user-space debugging for i386 and x86_6478* Windows user-space debugging for i386, x86_64, ARM and AArch64 (*)79 80(*) Support for Windows is under active development. Basic functionality is81expected to work, with functionality improving rapidly. ARM and AArch64 support82is more experimental, with more known issues than the others.83 84Support for the following architectures is in active development. For their85current state, follow the links to their respective issues:86 87* `RISC-V <https://github.com/llvm/llvm-project/issues/55383>`_88* `LoongArch <https://github.com/llvm/llvm-project/issues/112693>`_89* `WebAssembly <https://github.com/llvm/llvm-project/issues/150449>`_90 91Get Involved92------------93 94Check out the LLVM source-tree with git and find the sources in the `lldb`95subdirectory:96 97::98 99  $ git clone https://github.com/llvm/llvm-project.git100 101Note that LLDB generally builds from top-of-trunk using CMake and Ninja.102Additionally it builds:103 104* on macOS with a :ref:`generated Xcode project <CMakeGeneratedXcodeProject>`105* on Linux and FreeBSD with Clang and libstdc++/libc++106* on NetBSD with GCC/Clang and libstdc++/libc++107* on Windows with a generated project for VS 2017 or higher108 109See the :doc:`LLDB Build Page <resources/build>` for build instructions.110 111Discussions about LLDB should go to the `LLDB forum112<https://discourse.llvm.org/c/subprojects/lldb>`__ or the ``lldb`` channel on113the `LLVM Discord server <https://discord.com/invite/xS7Z362>`__.114 115For contributions follow the116`LLVM contribution process <https://llvm.org/docs/Contributing.html>`__. Commit117messages are automatically sent to the `lldb-commits118<http://lists.llvm.org/mailman/listinfo/lldb-commits>`__ mailing list.119 120See the :doc:`Projects page <resources/projects>` if you are looking for some121interesting areas to contribute to lldb.122 123.. toctree::124   :hidden:125   :maxdepth: 1126   :caption: Using LLDB127 128   use/tutorial129   use/map130   use/formatting131   use/variable132   use/symbolication133   use/symbols134   use/remote135   use/intel_pt136   use/ondemand137   use/aarch64-linux138   use/symbolfilejson139   use/mcp140   use/troubleshooting141   use/links142   Man Page <man/lldb>143 144.. toctree::145   :hidden:146   :maxdepth: 1147   :caption: Scripting LLDB148 149   use/python150   use/python-reference151   Python API <python_api>152   Python Extensions <python_extensions>153 154 155.. toctree::156   :hidden:157   :maxdepth: 1158   :caption: Developing LLDB159 160   resources/overview161   resources/contributing162   resources/build163   resources/test164   resources/qemu-testing165   resources/debugging166   resources/fuzzing167   resources/sbapi168   resources/dataformatters169   resources/formatterbytecode170   resources/extensions171   resources/lldbgdbremote172   resources/lldbplatformpackets173   resources/caveats174   resources/projects175   resources/lldbdap176   resources/addinglanguagesupport177   Public C++ API <https://lldb.llvm.org/cpp_reference/namespacelldb.html>178   Private C++ API <https://lldb.llvm.org/cpp_reference/index.html>179 180.. toctree::181   :hidden:182   :maxdepth: 1183   :caption: External Links184 185   Source Code <https://github.com/llvm/llvm-project>186   Releases <https://github.com/llvm/llvm-project/releases>187   Join the Discord <https://discord.gg/xS7Z362>188   Discord Channel <https://discord.com/channels/636084430946959380/636732809708306432>189   Discussion Forums <https://discourse.llvm.org/c/subprojects/lldb/8>190   Developer Policy <https://llvm.org/docs/DeveloperPolicy.html>191   Bug Reports <https://github.com/llvm/llvm-project/issues?q=is%3Aissue+label%3Alldb+is%3Aopen>192   Code Reviews <https://github.com/llvm/llvm-project/pulls?q=is%3Apr+label%3Alldb+is%3Aopen>193