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/SBType.i31
1 files changed, 31 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBType.i b/lldb/scripts/Python/interface/SBType.i
index 88fc7a3de63..1936c04039f 100644
--- a/lldb/scripts/Python/interface/SBType.i
+++ b/lldb/scripts/Python/interface/SBType.i
@@ -47,6 +47,37 @@ public:
GetName();
};
+%feature("docstring",
+"Represents a list of SBTypes. The FindTypes() method of SBTarget/SBModule
+returns a SBTypeList.
+
+SBTypeList supports SBType iteration. For example,
+
+main.cpp:
+
+class Task {
+public:
+ int id;
+ Task *next;
+ Task(int i, Task *n):
+ id(i),
+ next(n)
+ {}
+};
+
+...
+
+find_type.py:
+
+ # Get the type 'Task'.
+ type_list = target.FindTypes('Task')
+ self.assertTrue(len(type_list) == 1)
+ # To illustrate the SBType iteration.
+ for type in type_list:
+ # do something with type
+
+...
+") SBTypeList;
class SBTypeList
{
public:
OpenPOWER on IntegriCloud