diff options
author | Greg Clayton <gclayton@apple.com> | 2011-09-24 05:04:40 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-09-24 05:04:40 +0000 |
commit | d9dc52dc4c081baac2d611f978b9c01f72a625fe (patch) | |
tree | 8536e94a31dc32168ff09ae5deb02fab98dbd649 /lldb/scripts/Python | |
parent | 57087f3df3151d170680d4e30234c2a1528bff88 (diff) | |
download | bcm5719-llvm-d9dc52dc4c081baac2d611f978b9c01f72a625fe.tar.gz bcm5719-llvm-d9dc52dc4c081baac2d611f978b9c01f72a625fe.zip |
Added the ability to get all section contents, or the section
contents starting at an offset (2 separate methods). This helps
the scripting interface stay more natural by allowing both from
Python.
Added the ability to dump data with address annotations when
call SBData::GetDescription().
Hooked up the SBSection to the __repr__ so you can print section
objects from within python.
Improved the dumping of symbols from python.
Fixed the .i interface references which were set to "Relative to this Group"
which somehow included Jim's "lldb-clean" root directory in the path. The
interfaces are now in a folder called "interfaces" withing the Xcode API
subfolder.
llvm-svn: 140451
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/interface/SBData.i | 2 | ||||
-rw-r--r-- | lldb/scripts/Python/interface/SBSection.i | 3 | ||||
-rw-r--r-- | lldb/scripts/Python/python-extensions.swig | 7 |
3 files changed, 11 insertions, 1 deletions
diff --git a/lldb/scripts/Python/interface/SBData.i b/lldb/scripts/Python/interface/SBData.i index 4e87e6e379f..5ecf2c26e1e 100644 --- a/lldb/scripts/Python/interface/SBData.i +++ b/lldb/scripts/Python/interface/SBData.i @@ -75,7 +75,7 @@ public: GetString (lldb::SBError& error, uint32_t offset); bool - GetDescription (lldb::SBStream &description); + GetDescription (lldb::SBStream &description, lldb::addr_t base_addr); size_t ReadRawData (lldb::SBError& error, diff --git a/lldb/scripts/Python/interface/SBSection.i b/lldb/scripts/Python/interface/SBSection.i index 990a7053f5f..38af7a11a01 100644 --- a/lldb/scripts/Python/interface/SBSection.i +++ b/lldb/scripts/Python/interface/SBSection.i @@ -54,6 +54,9 @@ public: GetFileByteSize (); lldb::SBData + GetSectionData (); + + lldb::SBData GetSectionData (uint64_t offset, uint64_t size); diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig index 64506994287..246fd97982e 100644 --- a/lldb/scripts/Python/python-extensions.swig +++ b/lldb/scripts/Python/python-extensions.swig @@ -118,6 +118,13 @@ return PyString_FromString (description.GetData()); } } +%extend lldb::SBSection { + PyObject *lldb::SBSection::__repr__ (){ + lldb::SBStream description; + $self->GetDescription (description); + return PyString_FromString (description.GetData()); + } +} %extend lldb::SBSymbol { PyObject *lldb::SBSymbol::__repr__ (){ lldb::SBStream description; |