aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py')
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
new file mode 100644
index 000000000000..5c801c1fbf2e
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
@@ -0,0 +1,22 @@
+"""
+Fuzz tests an object after the default construction to make sure it does not crash lldb.
+"""
+
+import sys
+import lldb
+
+def fuzz_obj(obj):
+ obj.GetName()
+ obj.GetByteSize()
+ #obj.GetEncoding(5)
+ obj.GetNumberChildren(True)
+ member = lldb.SBTypeMember()
+ obj.GetChildAtIndex(True, 0, member)
+ obj.GetChildIndexForName(True, "_member_field")
+ obj.IsAPointerType()
+ obj.GetPointeeType()
+ obj.GetDescription(lldb.SBStream())
+ obj.IsPointerType(None)
+ lldb.SBType.IsPointerType(None)
+ for child_type in obj:
+ s = str(child_type)