From b92574ffb96b1940619a12dd6a4aef123ec9af57 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Mon, 3 Oct 2011 22:02:59 +0000 Subject: [PATCH] Add fuzz calls for various iterators, too. llvm-svn: 141035 --- lldb/test/python_api/default-constructor/sb_breakpoint.py | 2 ++ lldb/test/python_api/default-constructor/sb_compileunit.py | 2 ++ lldb/test/python_api/default-constructor/sb_debugger.py | 2 ++ .../python_api/default-constructor/sb_instructionlist.py | 2 ++ lldb/test/python_api/default-constructor/sb_module.py | 7 +++++++ lldb/test/python_api/default-constructor/sb_process.py | 2 ++ lldb/test/python_api/default-constructor/sb_stringlist.py | 2 ++ lldb/test/python_api/default-constructor/sb_target.py | 4 ++++ lldb/test/python_api/default-constructor/sb_thread.py | 2 ++ lldb/test/python_api/default-constructor/sb_type.py | 3 ++- lldb/test/python_api/default-constructor/sb_value.py | 2 ++ lldb/test/python_api/default-constructor/sb_valuelist.py | 2 ++ 12 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lldb/test/python_api/default-constructor/sb_breakpoint.py b/lldb/test/python_api/default-constructor/sb_breakpoint.py index 5ea5c62ad3ee..8618050c33da 100644 --- a/lldb/test/python_api/default-constructor/sb_breakpoint.py +++ b/lldb/test/python_api/default-constructor/sb_breakpoint.py @@ -31,3 +31,5 @@ def fuzz_obj(obj): obj.GetNumResolvedLocations() obj.GetNumLocations() obj.GetDescription(lldb.SBStream()) + for bp_loc in obj: + print bp_loc diff --git a/lldb/test/python_api/default-constructor/sb_compileunit.py b/lldb/test/python_api/default-constructor/sb_compileunit.py index 1bee4d5a39dc..9c2e597203ce 100644 --- a/lldb/test/python_api/default-constructor/sb_compileunit.py +++ b/lldb/test/python_api/default-constructor/sb_compileunit.py @@ -11,3 +11,5 @@ def fuzz_obj(obj): obj.GetLineEntryAtIndex(0xffffffff) obj.FindLineEntryIndex(0, 0xffffffff, None) obj.GetDescription(lldb.SBStream()) + for line_entry in obj: + print line_entry diff --git a/lldb/test/python_api/default-constructor/sb_debugger.py b/lldb/test/python_api/default-constructor/sb_debugger.py index 84c9842474c8..e5cdf2ce4b5a 100644 --- a/lldb/test/python_api/default-constructor/sb_debugger.py +++ b/lldb/test/python_api/default-constructor/sb_debugger.py @@ -52,3 +52,5 @@ def fuzz_obj(obj): obj.SetCloseInputOnEOF(True) obj.SetCloseInputOnEOF(False) obj.Clear() + for target in obj: + print target diff --git a/lldb/test/python_api/default-constructor/sb_instructionlist.py b/lldb/test/python_api/default-constructor/sb_instructionlist.py index 59907030f162..9674af824460 100644 --- a/lldb/test/python_api/default-constructor/sb_instructionlist.py +++ b/lldb/test/python_api/default-constructor/sb_instructionlist.py @@ -13,3 +13,5 @@ def fuzz_obj(obj): obj.GetDescription(lldb.SBStream()) obj.DumpEmulationForAllInstructions("armv7") obj.Clear() + for inst in obj: + print inst diff --git a/lldb/test/python_api/default-constructor/sb_module.py b/lldb/test/python_api/default-constructor/sb_module.py index 5867a11f62ff..990337a9f9a4 100644 --- a/lldb/test/python_api/default-constructor/sb_module.py +++ b/lldb/test/python_api/default-constructor/sb_module.py @@ -17,3 +17,10 @@ def fuzz_obj(obj): obj.GetSymbolAtIndex(sys.maxint) obj.FindFunctions("my_func", 0xffffffff, True, lldb.SBSymbolContextList()) obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1) + for section in obj.section_iter(): + print section + for symbol in obj.symbol_in_section_iter(lldb.SBSection()): + print symbol + for symbol in obj: + print symbol + diff --git a/lldb/test/python_api/default-constructor/sb_process.py b/lldb/test/python_api/default-constructor/sb_process.py index a54dae2331c0..4f892e57f147 100644 --- a/lldb/test/python_api/default-constructor/sb_process.py +++ b/lldb/test/python_api/default-constructor/sb_process.py @@ -41,3 +41,5 @@ def fuzz_obj(obj): obj.LoadImage(lldb.SBFileSpec(), error) obj.UnloadImage(0) obj.Clear() + for thread in obj: + print thread diff --git a/lldb/test/python_api/default-constructor/sb_stringlist.py b/lldb/test/python_api/default-constructor/sb_stringlist.py index 7676bf2cc379..d69a2dfd4a41 100644 --- a/lldb/test/python_api/default-constructor/sb_stringlist.py +++ b/lldb/test/python_api/default-constructor/sb_stringlist.py @@ -12,3 +12,5 @@ def fuzz_obj(obj): obj.GetSize() obj.GetStringAtIndex(0xffffffff) obj.Clear() + for str in obj: + print str diff --git a/lldb/test/python_api/default-constructor/sb_target.py b/lldb/test/python_api/default-constructor/sb_target.py index e1a5db63cf32..d7eab047693b 100644 --- a/lldb/test/python_api/default-constructor/sb_target.py +++ b/lldb/test/python_api/default-constructor/sb_target.py @@ -51,3 +51,7 @@ def fuzz_obj(obj): obj.GetBroadcaster() obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelBrief) obj.Clear() + for module in obj.module_iter(): + print module + for bp in obj.breakpoint_iter(): + print bp diff --git a/lldb/test/python_api/default-constructor/sb_thread.py b/lldb/test/python_api/default-constructor/sb_thread.py index c4fb48383507..5f342330ebdc 100644 --- a/lldb/test/python_api/default-constructor/sb_thread.py +++ b/lldb/test/python_api/default-constructor/sb_thread.py @@ -33,3 +33,5 @@ def fuzz_obj(obj): obj.GetProcess() obj.GetDescription(lldb.SBStream()) obj.Clear() + for frame in obj: + print frame diff --git a/lldb/test/python_api/default-constructor/sb_type.py b/lldb/test/python_api/default-constructor/sb_type.py index 3eca95283576..99de8577b763 100644 --- a/lldb/test/python_api/default-constructor/sb_type.py +++ b/lldb/test/python_api/default-constructor/sb_type.py @@ -18,4 +18,5 @@ def fuzz_obj(obj): obj.GetDescription(lldb.SBStream()) obj.IsPointerType(None) lldb.SBType.IsPointerType(None) - + for child_type in obj: + print child_type diff --git a/lldb/test/python_api/default-constructor/sb_value.py b/lldb/test/python_api/default-constructor/sb_value.py index c2b90e59f390..715ba1ce493a 100644 --- a/lldb/test/python_api/default-constructor/sb_value.py +++ b/lldb/test/python_api/default-constructor/sb_value.py @@ -33,3 +33,5 @@ def fuzz_obj(obj): obj.GetDescription(stream) obj.GetExpressionPath(stream) obj.GetExpressionPath(stream, True) + for child_val in obj: + print child_val diff --git a/lldb/test/python_api/default-constructor/sb_valuelist.py b/lldb/test/python_api/default-constructor/sb_valuelist.py index 6d659097c183..4e41e11f29ed 100644 --- a/lldb/test/python_api/default-constructor/sb_valuelist.py +++ b/lldb/test/python_api/default-constructor/sb_valuelist.py @@ -10,3 +10,5 @@ def fuzz_obj(obj): obj.GetSize() obj.GetValueAtIndex(100) obj.FindValueObjectByUID(200) + for val in obj: + print val