1
- Debugging LLDB
2
- ==============
1
+ Debugging
2
+ =========
3
3
4
4
This page details various ways to debug LLDB itself and other LLDB tools. If
5
5
you want to know how to use LLDB in general, please refer to
@@ -21,12 +21,17 @@ configuration:
21
21
::
22
22
23
23
-DCMAKE_BUILD_TYPE=Debug \
24
- -DLLDB_EXPORT_ALL_SYMBOLS=1
24
+ -DLLDB_EXPORT_ALL_SYMBOLS=ON
25
25
26
26
Note that the ``lldb `` you will use to do the debugging does not itself need to
27
27
have debug information.
28
28
29
- Then build as you normally would.
29
+ Then build as you normally would according to :doc: `/resources/build `.
30
+
31
+ If you are going to debug in a way that doesn't need debug info (printf, strace,
32
+ etc.) we recommend adding ``LLVM_ENABLE_ASSERTIONS=ON `` to Release build
33
+ configurations. This will make LLDB fail earlier instead of continuing with
34
+ invalid state (assertions are enabled by default for Debug builds).
30
35
31
36
Debugging ``lldb ``
32
37
------------------
@@ -84,7 +89,7 @@ it's thinking overhead, and for interrupt based events you simply may not be
84
89
able to know.
85
90
86
91
Here are some better approaches. First, you could use another debugger like GDB
87
- to debug LLDB. Perhaps an IDE like XCode or Visual Studio Code. Something which
92
+ to debug LLDB. Perhaps an IDE like Xcode or Visual Studio Code. Something which
88
93
runs LLDB under the hood so you don't have to type in commands to the debugger
89
94
yourself.
90
95
@@ -252,3 +257,4 @@ You would use ``lldb A`` to place a breakpoint in the code you're interested in,
252
257
then ``lldb B `` to trigger ``lldb-server B `` to go into that code and hit the
253
258
breakpoint. ``lldb-server A `` is only here to let us debug ``lldb-server B ``
254
259
remotely.
260
+
0 commit comments