Add a utility function smart_iter() which has knowledge of the getsize and the getelem
method names of all the lldb container objects and returns an iterator object when passed an eligible lldb container object. Example: from lldb_util import smart_iter for thread in smart_iter(process): ID = thread.GetThreadID() if thread.GetStopReason() == lldb.eStopReasonBreakpoint: stopped_due_to_breakpoint = True for frame in smart_iter(thread): self.assertTrue(frame.GetThread().GetThreadID() == ID) ... Add a test case for lldb.smart_iter(). llvm-svn: 130332
Loading
Please register or sign in to comment