def list_of_type(self, type, member, forward=True): if not self.is_valid(): return ## Get the first element if forward: lst = self.Flink.dereference() else: lst = self.Blink.dereference() offset = self.profile.get_obj_offset(type, member) seen = set() seen.add(lst.offset) while 1: ## Instantiate the object obj = NewObject(type, offset=lst.offset - offset, vm=self.vm, parent=self.parent, profile=self.profile, name=type) if forward: lst = obj.m(member).Flink.dereference() else: lst = obj.m(member).Blink.dereference() if not lst.is_valid() or lst.offset in seen: return seen.add(lst.offset) yield obj
def list_of_type(self, type, member, forward=True): if not self.is_valid(): return ## Get the first element if forward: lst = self.Flink.dereference() else: lst = self.Blink.dereference() offset = self.profile.get_obj_offset(type ,member) seen = set() seen.add(lst.offset) while 1: ## Instantiate the object obj = NewObject(type, offset = lst.offset - offset, vm=self.vm, parent=self.parent, profile=self.profile, name=type) if forward: lst = obj.m(member).Flink.dereference() else: lst = obj.m(member).Blink.dereference() if not lst.is_valid() or lst.offset in seen: return seen.add(lst.offset) yield obj