Implemented a types.py module that allows types to be inspected for padding.
The script was able to point out and save 40 bytes in each lldb_private::Section by being very careful where we need to have virtual destructors and also by re-ordering members.
llvm-svn: 184364
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig
index a6ca497..14dc044 100644
--- a/lldb/scripts/Python/python-extensions.swig
+++ b/lldb/scripts/Python/python-extensions.swig
@@ -759,7 +759,7 @@
%pythoncode %{
def command(*args, **kwargs):
- from lldb import debugger
+ import lldb
"""A decorator function that registers an LLDB command line
command that is bound to the function it is attached to."""
class obj(object):
@@ -769,7 +769,7 @@
if doc:
function.__doc__ = doc
command = "command script add -f %s.%s %s" % (function.__module__, function.__name__, command_name)
- debugger.HandleCommand(command)
+ lldb.debugger.HandleCommand(command)
self.function = function
def __call__(self, *args, **kwargs):
self.function(*args, **kwargs)