annotate lldb/docs/index.rst @ 150:1d019706d866

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