The `__future__` we relied on is now, where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):
* absolute_import
* print_function
* unicode_literals
* division
These import statements are no-ops and are no longer necessary.
The routine already supports dumping the assembly to file if we are at a
breakpoint using the current frame. This adds a -n option so one can without
running just dump the assembly to a file of a specific function in a binary.
* More Python3 lint fixes
Some of the issues addressed include:
* Don't use `l` as a variable name (confusable with `1` or `I`)
* `print` statement does not exist in Py3, use `print` function instead
* Implicit tuple deconstruction in function args is no longer supported,
use explicit splat `*` at the call site instead
* `xrange` does not exist in Py3, use `range` instead
* Better name per review feedback
Just something I cooked up really quickly b/c I needed it. If you want to use
this, lldb-with-tools will auto-import it, so I suggest that you use that.
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.