diff options
author | Greg Clayton <gclayton@apple.com> | 2016-06-24 23:40:35 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-06-24 23:40:35 +0000 |
commit | 4d32eb6939d77f8059683c008bb807167110e930 (patch) | |
tree | 4ce25b64edc8b5a7332255196e30e8fb20502cf5 /lldb/scripts/Python | |
parent | dd9e03ed874b2280af95c04fe7b0d383ead3261f (diff) | |
download | bcm5719-llvm-4d32eb6939d77f8059683c008bb807167110e930.tar.gz bcm5719-llvm-4d32eb6939d77f8059683c008bb807167110e930.zip |
Add .i files for SBMemoryRegionInfo and SBMemoryRegionInfoList and also hook up the new calls in SBProcess that give out SBMemoryRegionInfo and SBMemoryRegionInfoList objects.
Also make sure the right headers and .i files are included so SWIG can hook everything up.
llvm-svn: 273749
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/python-extensions.swig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig index 487bf1e3599..693b06b9aab 100644 --- a/lldb/scripts/Python/python-extensions.swig +++ b/lldb/scripts/Python/python-extensions.swig @@ -325,6 +325,22 @@ return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs) %} } + +%extend lldb::SBMemoryRegionInfo { + PyObject *lldb::SBMemoryRegionInfo::__str__ (){ + lldb::SBStream description; + $self->GetDescription (description); + const char *desc = description.GetData(); + size_t desc_len = description.GetSize(); + if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) + --desc_len; + if (desc_len > 0) + return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release(); + else + return lldb_private::PythonString("").release(); + } +} + %extend lldb::SBModule { PyObject *lldb::SBModule::__str__ (){ lldb::SBStream description; |