From 1d273166064c5163a1ca2be9a8e65cb628fc3524 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 6 Oct 2010 03:09:58 +0000 Subject: Added the ability to get the disassembly instructions from the function and symbol. llvm-svn: 115734 --- lldb/scripts/Python/python-extensions.swig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lldb/scripts/Python/python-extensions.swig') 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; -- cgit v1.2.3