diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-07-27 21:14:01 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-07-27 21:14:01 +0000 |
| commit | bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d (patch) | |
| tree | 57cc7972a50326acc68a9883fd2e68c6741ae2e6 /lldb/scripts/Python | |
| parent | 03f56d9de6d4620bc42c0ead65d4f33beb178c80 (diff) | |
| download | bcm5719-llvm-bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d.tar.gz bcm5719-llvm-bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d.zip | |
The SBValue.linked_list_iter() API failed for an empty list.
Fix the bug and add a test case.
llvm-svn: 136265
Diffstat (limited to 'lldb/scripts/Python')
| -rw-r--r-- | lldb/scripts/Python/modify-python-lldb.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/scripts/Python/modify-python-lldb.py b/lldb/scripts/Python/modify-python-lldb.py index 3cd312638bf..9f5f8c95a32 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 |

