diff options
Diffstat (limited to 'lldb/scripts/Python')
-rwxr-xr-x | lldb/scripts/Python/build-swig-Python.sh | 2 | ||||
-rw-r--r-- | lldb/scripts/Python/python-extensions.swig | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lldb/scripts/Python/build-swig-Python.sh b/lldb/scripts/Python/build-swig-Python.sh index dffc466c02f..13df2062796 100755 --- a/lldb/scripts/Python/build-swig-Python.sh +++ b/lldb/scripts/Python/build-swig-Python.sh @@ -44,6 +44,8 @@ HEADER_FILES="${SRC_ROOT}/include/lldb/lldb-types.h"\ " ${SRC_ROOT}/include/lldb/API/SBFileSpec.h"\ " ${SRC_ROOT}/include/lldb/API/SBFrame.h"\ " ${SRC_ROOT}/include/lldb/API/SBFunction.h"\ +" ${SRC_ROOT}/include/lldb/API/SBInstruction.h"\ +" ${SRC_ROOT}/include/lldb/API/SBInstructionList.h"\ " ${SRC_ROOT}/include/lldb/API/SBLineEntry.h"\ " ${SRC_ROOT}/include/lldb/API/SBListener.h"\ " ${SRC_ROOT}/include/lldb/API/SBModule.h"\ diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig index 7d706fd0d63..e92ecf6428e 100644 --- a/lldb/scripts/Python/python-extensions.swig +++ b/lldb/scripts/Python/python-extensions.swig @@ -76,6 +76,20 @@ return PyString_FromString (description.GetData()); } } +%extend lldb::SBInstruction { + PyObject *lldb::SBInstruction::__repr__ (){ + lldb::SBStream description; + $self->GetDescription (description); + return PyString_FromString (description.GetData()); + } +} +%extend lldb::SBInstructionList { + PyObject *lldb::SBInstructionList::__repr__ (){ + lldb::SBStream description; + $self->GetDescription (description); + return PyString_FromString (description.GetData()); + } +} %extend lldb::SBLineEntry { PyObject *lldb::SBLineEntry::__repr__ (){ lldb::SBStream description; |