Skip to content

Commit 4a0ec87

Browse files
committed
docs: Mention the blockifyasm script in DebuggingTheCompiler
1 parent a7c7d63 commit 4a0ec87

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/DebuggingTheCompiler.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,18 @@ to be invoked with the sil function body. Note,
249249
``sil-mode-display-function-cfg`` does not take any arguments.
250250

251251
**NOTE** viewcfg must be in the $PATH for viewcfg to work.
252+
252253
**NOTE** Since we use open, .dot files should be associated with the Graphviz app for viewcfg to work.
253254

255+
There is another useful script to view the CFG of a disassembled function:
256+
``./utils/dev-scripts/blockifyasm``.
257+
It splits a disassembled function up into basic blocks which can then be
258+
used with viewcfg::
259+
260+
(lldb) disassemble
261+
<copy-paste output to file.s>
262+
$ blockifyasm < file.s | viewcfg
263+
254264
Using Breakpoints
255265
~~~~~~~~~~~~~~~~~
256266

0 commit comments

Comments
 (0)