@@ -38,16 +38,18 @@ e.g. ``-mllvm -print-after-all``.
3838Understanding the source of the issue
3939===================================== 
4040
41- If you have a miscompilation introduced by a pass, it is frequently
42- possible to identify the pass where things go wrong by searching a
43- pass-by-pass printout, which is enabled using the ``-print-after-all ``
44- flag. Pipe stderr into ``less `` (append ``2>&1 | less `` to command
45- line) and use text search to move between passes (e.g. type ``/Dump 
46- After<Enter> ``, ``n `` to move to next pass, ``N `` to move to previous
47- pass). If the name of the function containing the buggy IR is known, you
48- can filter the output by passing ``-filter-print-funcs=functionname ``. You
49- can sometimes pass ``-debug `` to get useful details about what passes
50- are doing.
41+ If you have a miscompilation introduced by a pass, it is
42+ frequently possible to identify the pass where things go wrong
43+ by searching a pass-by-pass printout, which is enabled using the
44+ ``-print-after-all `` flag. Pipe stderr into ``less `` (append ``2>&1 | 
45+ less `` to command line) and use text search to move between passes
46+ (e.g. type ``/Dump After<Enter> ``, ``n `` to move to next pass,
47+ ``N `` to move to previous pass). If the name of the function
48+ containing the buggy IR is known, you can filter the output by passing
49+ ``-filter-print-funcs=functionname ``. You can sometimes pass ``-debug `` to
50+ get useful details about what passes are doing. See also  `PrintPasses.cpp 
51+ <https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/PrintPasses.cpp> `_
52+ for more useful options.
5153
5254Creating a debug build of LLVM
5355============================== 
@@ -76,8 +78,7 @@ such as the following:
7678
7779.. code-block :: text 
7880
79-     b Instruction::Instruction 
80-     cond 1 this == 0x12345678 
81+     b Instruction::Instruction if this == 0x12345678 
8182
8283 When the breakpoint is hit, you will likely be at the location where
8384the instruction was created, so you can unwind the stack with ``bt ``
@@ -106,5 +107,5 @@ following (or add it to your ``~/.gdbinit``)::
106107  source /path/to/llvm/src/utils/gdb-scripts/prettyprinters.py 
107108
108109It also might be handy to enable the `print pretty 
109- <http ://ftp.gnu. org/old-gnu/Manuals/ gdb/html_node/gdb_57 .html> `__ option to 
110- avoid data structures being printed as a big block of text.
110+ <https ://sourceware. org/gdb/current/onlinedocs/ gdb.html/Print-Settings .html> `__
111+ option to  avoid data structures being printed as a big block of text.
0 commit comments