Sometimes it is really useful to be able to dump the disassembly from lldb into
a file so that one can work with the disassembly in an editor. The disassemble
command in lldb does not provide such facility today. So this lldb function in
the lldb toolbox provides such a facility.
This works by dumping the disassembly of the current assembly frame into a
temporary file and then running:
blockifyasm < tmpfile | viewcfg
without having to leave lldb.
I also fixed a small bug in the lldb-with-tools.in script where the input was
passed onto lldb as:
lldb -O '...' -- $@
The -- should not have been there since sometimes one wants to /not/ use a --
argument form to lldb.
This is a simple tool that starts lldb, but before it runs your commands, uses
the -O command to load lldbToolBox.py. This provide sthe llvm data formatters as
well as potential future lldb extensions that we write for swift itself.
A better name for this utility would be much appreciated, but I think for now
the name "lldb-with-tools" is at least self explanatory.