Skip to content

Commit c6f11ad

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents 0af1802 + 04999aa commit c6f11ad

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/DebuggingTheCompiler.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
.. highlight:: none
44

5-
============================
5+
.. contents::
6+
67
Debugging the Swift Compiler
78
============================
89

9-
.. contents::
10-
1110
Abstract
1211
--------
1312

@@ -440,14 +439,14 @@ For more information and a high level example, see:
440439

441440

442441
Debugging Swift Executables
443-
---------------------------
442+
===========================
444443

445444
One can use the previous tips for debugging the Swift compiler with Swift
446445
executables as well. Here are some additional useful techniques that one can use
447446
in Swift executables.
448447

449448
Determining the mangled name of a function in LLDB
450-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449+
--------------------------------------------------
451450

452451
One problem that often comes up when debugging Swift code in LLDB is that LLDB
453452
shows the demangled name instead of the mangled name. This can lead to mistakes
@@ -461,8 +460,8 @@ function in the current frame::
461460
Module: file = "/Volumes/Files/work/solon/build/build-swift/validation-test-macosx-x86_64/stdlib/Output/CollectionType.swift.gyb.tmp/CollectionType3", arch = "x86_64"
462461
Symbol: id = {0x0000008c}, range = [0x0000000100004db0-0x00000001000056f0), name="ext.CollectionType3.CollectionType3.MutableCollectionType2<A where A: CollectionType3.MutableCollectionType2>.(subscript.materializeForSet : (Swift.Range<A.Index>) -> Swift.MutableSlice<A>).(closure #1)", mangled="_TFFeRq_15CollectionType322MutableCollectionType2_S_S0_m9subscriptFGVs5Rangeqq_s16MutableIndexable5Index_GVs12MutableSliceq__U_FTBpRBBRQPS0_MS4__T_"
463462

464-
Debugging failures in LLDB
465-
~~~~~~~~~~~~~~~~~~~~~~~~~~
463+
Debugging LLDB failures
464+
=======================
466465

467466
Sometimes one needs to be able to while debugging actually debug LLDB and its
468467
interaction with Swift itself. Some examples of problems where this can come up
@@ -483,7 +482,7 @@ For more details about any of the information below, please run::
483482
(lldb) help log enable
484483

485484
"Types" Log
486-
```````````
485+
-----------
487486

488487
The "types" log reports on LLDB's process of constructing SwiftASTContexts and
489488
errors that may occur. The two main tasks here are:
@@ -514,7 +513,7 @@ This will ensure that the type import command is run before /any/ modules are
514513
imported.
515514

516515
"Expression" Log
517-
````````````````
516+
----------------
518517

519518
The "expression" log reports on the process of wrapping, parsing, SILGen'ing,
520519
JITing, and inserting an expression into the current Swift module. Since this can
@@ -542,7 +541,7 @@ such a situation, run all expressions before the bad expression, turn on the
542541
logging, and only then run the bad expression.
543542

544543
Multiple Logs at a Time
545-
```````````````````````
544+
-----------------------
546545

547546
Note, you can also turn on more than one log at a time as well, e.x.::
548547

0 commit comments

Comments
 (0)