diff options
-rw-r--r-- | lldb/scripts/Python/interface/SBValue.i | 6 | ||||
-rw-r--r-- | lldb/scripts/Python/modify-python-lldb.py | 16 |
2 files changed, 16 insertions, 6 deletions
diff --git a/lldb/scripts/Python/interface/SBValue.i b/lldb/scripts/Python/interface/SBValue.i index f6e610531b6..c037f1622a6 100644 --- a/lldb/scripts/Python/interface/SBValue.i +++ b/lldb/scripts/Python/interface/SBValue.i @@ -49,7 +49,11 @@ Name: rip Value: 0x0000000100000dae Name: rflags Value: 0x0000000000000206 Name: cs Value: 0x0000000000000027 Name: fs Value: 0x0000000000000010 -Name: gs Value: 0x0000000000000048" +Name: gs Value: 0x0000000000000048 + +See also linked_list_iter() for another perspective on how to iterate through an +SBValue instance which interprets the value object as representing the head of a +linked list." ) SBValue; class SBValue { diff --git a/lldb/scripts/Python/modify-python-lldb.py b/lldb/scripts/Python/modify-python-lldb.py index 6b44f264132..0a0ad2417cd 100644 --- a/lldb/scripts/Python/modify-python-lldb.py +++ b/lldb/scripts/Python/modify-python-lldb.py @@ -83,17 +83,23 @@ def lldb_iter(obj, getsize, getelem): ''' # -# linked_list_iter() is a special purpose iterator to treat the SBValue as a -# list data structure, where you specify the child member name which points to -# the next item on the list and you specify the end-of-list function which takes -# an SBValue and returns True if EOL is reached and False if not. +# linked_list_iter() is a special purpose iterator to treat the SBValue as the +# head of a list data structure, where you specify the child member name which +# points to the next item on the list and you specify the end-of-list function +# which takes an SBValue and returns True if EOL is reached and False if not. # linked_list_iter_def = ''' # ================================================== # Iterator for lldb.SBValue treated as a linked list # ================================================== def linked_list_iter(self, next_item_name, end_of_list): - """A generator adaptor to support iteration for SBValue as a linked list. + """Generator adaptor to support iteration for SBValue as a linked list. + + linked_list_iter() is a special purpose iterator to treat the SBValue as + the head of a list data structure, where you specify the child member + name which points to the next item on the list and you specify the + end-of-list test function which takes an SBValue for an item and returns + True if EOL is reached and False if not. For example, |