aboutsummaryrefslogtreecommitdiff
path: root/lldb/scripts/Python/modify-python-lldb.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-07-27 21:14:01 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-07-27 21:14:01 +0000
commitbfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d (patch)
tree57cc7972a50326acc68a9883fd2e68c6741ae2e6 /lldb/scripts/Python/modify-python-lldb.py
parent03f56d9de6d4620bc42c0ead65d4f33beb178c80 (diff)
downloadllvm-bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d.zip
llvm-bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d.tar.gz
llvm-bfdf9a36d97932f14cceb58d2d0d712f6f1e9d6d.tar.bz2
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/modify-python-lldb.py')
-rw-r--r--lldb/scripts/Python/modify-python-lldb.py4
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 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