summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/default-constructor/sb_function.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-27 23:53:55 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-27 23:53:55 +0000
commit40e978f7b331df942709e8ca20b8c6bce076eaac (patch)
tree919aac1ed7f51004d372cf2c1dc94fba79625422 /lldb/test/python_api/default-constructor/sb_function.py
parent105974d49741b968b94146763a6ee99db4262784 (diff)
downloadbcm5719-llvm-40e978f7b331df942709e8ca20b8c6bce076eaac.tar.gz
bcm5719-llvm-40e978f7b331df942709e8ca20b8c6bce076eaac.zip
Add fuzz calls for SBFrame and SBFunction.
llvm-svn: 133965
Diffstat (limited to 'lldb/test/python_api/default-constructor/sb_function.py')
-rw-r--r--lldb/test/python_api/default-constructor/sb_function.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/test/python_api/default-constructor/sb_function.py b/lldb/test/python_api/default-constructor/sb_function.py
new file mode 100644
index 00000000000..fb88d37ac19
--- /dev/null
+++ b/lldb/test/python_api/default-constructor/sb_function.py
@@ -0,0 +1,19 @@
+"""
+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.GetMangledName()
+ obj.GetInstructions(lldb.SBTarget())
+ sa = obj.GetStartAddress()
+ ea = obj.GetEndAddress()
+ # Do fuzz testing on the address obj, it should not crash lldb.
+ import sb_address
+ sb_address.fuzz_obj(sa)
+ sb_address.fuzz_obj(ea)
+ obj.GetPrologueByteSize
+ obj.GetDescription(lldb.SBStream())
OpenPOWER on IntegriCloud