From bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Wed, 27 Jul 2011 21:14:01 +0000 Subject: The SBValue.linked_list_iter() API failed for an empty list. Fix the bug and add a test case. llvm-svn: 136265 --- lldb/scripts/Python/modify-python-lldb.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lldb/scripts/Python/modify-python-lldb.py') diff --git a/lldb/scripts/Python/modify-python-lldb.py b/lldb/scripts/Python/modify-python-lldb.py index 3cd3126..9f5f8c9 100644 --- a/lldb/scripts/Python/modify-python-lldb.py +++ b/lldb/scripts/Python/modify-python-lldb.py @@ -129,12 +129,10 @@ linked_list_iter_def = ''' """ try: item = self.GetChildMemberWithName(next_item_name) - while item: + while not end_of_list_test(item): yield item # Prepare for the next iteration. item = item.GetChildMemberWithName(next_item_name) - if end_of_list_test(item): - break except: # Exception occurred. Stop the generator. pass -- cgit v1.1