summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r--lldb/scripts/Python/interface/SBAddress.i8
-rw-r--r--lldb/scripts/Python/interface/SBModule.i4
-rw-r--r--lldb/scripts/Python/interface/SBSection.i6
3 files changed, 15 insertions, 3 deletions
diff --git a/lldb/scripts/Python/interface/SBAddress.i b/lldb/scripts/Python/interface/SBAddress.i
index 1472c4f3588..7d3e36c66fd 100644
--- a/lldb/scripts/Python/interface/SBAddress.i
+++ b/lldb/scripts/Python/interface/SBAddress.i
@@ -50,6 +50,9 @@ public:
SBAddress (const lldb::SBAddress &rhs);
+ SBAddress (lldb::SBSection section,
+ lldb::addr_t offset);
+
%feature("docstring", "
Create an address by resolving a load address using the supplied target.
") SBAddress;
@@ -85,6 +88,11 @@ public:
lldb::addr_t
SBAddress::GetOffset ();
+ void
+ SetAddress (lldb::SBSection section,
+ lldb::addr_t offset);
+
+
%feature("docstring", "
//------------------------------------------------------------------
/// GetSymbolContext() and the following can lookup symbol information for a given address.
diff --git a/lldb/scripts/Python/interface/SBModule.i b/lldb/scripts/Python/interface/SBModule.i
index d66e169f0d9..49e032d8b82 100644
--- a/lldb/scripts/Python/interface/SBModule.i
+++ b/lldb/scripts/Python/interface/SBModule.i
@@ -320,12 +320,10 @@ public:
if key < count:
return self.sbmodule.GetSectionAtIndex(key)
elif type(key) is str:
- matches = []
for idx in range(count):
section = self.sbmodule.GetSectionAtIndex(idx)
if section.name == key:
- matches.append(section)
- return matches
+ return section
elif isinstance(key, self.re_compile_type):
matches = []
for idx in range(count):
diff --git a/lldb/scripts/Python/interface/SBSection.i b/lldb/scripts/Python/interface/SBSection.i
index 78980b51667..95838755c59 100644
--- a/lldb/scripts/Python/interface/SBSection.i
+++ b/lldb/scripts/Python/interface/SBSection.i
@@ -88,9 +88,15 @@ public:
GetDescription (lldb::SBStream &description);
%pythoncode %{
+ def get_addr(self):
+ return SBAddress(self, 0)
+
__swig_getmethods__["name"] = GetName
if _newclass: x = property(GetName, None)
+ __swig_getmethods__["addr"] = get_addr
+ if _newclass: x = property(get_addr, None)
+
__swig_getmethods__["file_addr"] = GetFileAddress
if _newclass: x = property(GetFileAddress, None)
OpenPOWER on IntegriCloud