summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBSymbolContextList.i
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/interface/SBSymbolContextList.i')
-rw-r--r--lldb/scripts/Python/interface/SBSymbolContextList.i85
1 files changed, 85 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBSymbolContextList.i b/lldb/scripts/Python/interface/SBSymbolContextList.i
index 6ea5978baed..0a03a22d4ab 100644
--- a/lldb/scripts/Python/interface/SBSymbolContextList.i
+++ b/lldb/scripts/Python/interface/SBSymbolContextList.i
@@ -49,7 +49,92 @@ public:
GetContextAtIndex (uint32_t idx);
void
+ Append (lldb::SBSymbolContext &sc);
+
+ void
+ Append (lldb::SBSymbolContextList &sc_list);
+
+ bool
+ GetDescription (lldb::SBStream &description);
+
+ void
Clear();
+
+ %pythoncode %{
+ def __len__(self):
+ return self.GetSize()
+
+ def __getitem__(self, key):
+ count = len(self)
+ if type(key) is int:
+ if key < count:
+ return self.GetContextAtIndex(key)
+ else:
+ raise IndexError
+ raise TypeError
+
+ def get_module_array(self):
+ a = []
+ for i in range(len(self)):
+ obj = self.GetContextAtIndex(i).module
+ if obj:
+ a.append(obj)
+ return a
+
+ def get_compile_unit_array(self):
+ a = []
+ for i in range(len(self)):
+ obj = self.GetContextAtIndex(i).compile_unit
+ if obj:
+ a.append(obj)
+ return a
+ def get_function_array(self):
+ a = []
+ for i in range(len(self)):
+ obj = self.GetContextAtIndex(i).function
+ if obj:
+ a.append(obj)
+ return a
+ def get_block_array(self):
+ a = []
+ for i in range(len(self)):
+ obj = self.GetContextAtIndex(i).block
+ if obj:
+ a.append(obj)
+ return a
+ def get_symbol_array(self):
+ a = []
+ for i in range(len(self)):
+ obj = self.GetContextAtIndex(i).symbol
+ if obj:
+ a.append(obj)
+ return a
+ def get_line_entry_array(self):
+ a = []
+ for i in range(len(self)):
+ obj = self.GetContextAtIndex(i).line_entry
+ if obj:
+ a.append(obj)
+ return a
+ __swig_getmethods__["modules"] = get_module_array
+ if _newclass: x = property(get_module_array, None)
+
+ __swig_getmethods__["compile_units"] = get_compile_unit_array
+ if _newclass: x = property(get_compile_unit_array, None)
+
+ __swig_getmethods__["functions"] = get_function_array
+ if _newclass: x = property(get_function_array, None)
+
+ __swig_getmethods__["blocks"] = get_block_array
+ if _newclass: x = property(get_block_array, None)
+
+ __swig_getmethods__["line_entries"] = get_line_entry_array
+ if _newclass: x = property(get_line_entry_array, None)
+
+ __swig_getmethods__["symbols"] = get_symbol_array
+ if _newclass: x = property(get_symbol_array, None)
+ %}
+
};
} // namespace lldb
OpenPOWER on IntegriCloud