Skip to content

Commit ecb34e1

Browse files
committed
Respond to review comments
* Renamed page to just "debug", renamed the file. * Link back to build documentation * Fix Xcode naming. * Note assertions option.
1 parent 5b09474 commit ecb34e1

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

lldb/docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ interesting areas to contribute to lldb.
148148
resources/contributing
149149
resources/build
150150
resources/test
151-
resources/debugging-lldb
151+
resources/debugging
152152
resources/fuzzing
153153
resources/sbapi
154154
resources/extensions

lldb/docs/resources/debugging-lldb.rst renamed to lldb/docs/resources/debugging.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Debugging LLDB
2-
==============
1+
Debugging
2+
=========
33

44
This page details various ways to debug LLDB itself and other LLDB tools. If
55
you want to know how to use LLDB in general, please refer to
@@ -21,12 +21,17 @@ configuration:
2121
::
2222

2323
-DCMAKE_BUILD_TYPE=Debug \
24-
-DLLDB_EXPORT_ALL_SYMBOLS=1
24+
-DLLDB_EXPORT_ALL_SYMBOLS=ON
2525

2626
Note that the ``lldb`` you will use to do the debugging does not itself need to
2727
have debug information.
2828

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).
3035

3136
Debugging ``lldb``
3237
------------------
@@ -84,7 +89,7 @@ it's thinking overhead, and for interrupt based events you simply may not be
8489
able to know.
8590

8691
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
8893
runs LLDB under the hood so you don't have to type in commands to the debugger
8994
yourself.
9095

@@ -252,3 +257,4 @@ You would use ``lldb A`` to place a breakpoint in the code you're interested in,
252257
then ``lldb B`` to trigger ``lldb-server B`` to go into that code and hit the
253258
breakpoint. ``lldb-server A`` is only here to let us debug ``lldb-server B``
254259
remotely.
260+

0 commit comments

Comments
 (0)