def test_SBLineEntry(self):
     obj = lldb.SBLineEntry()
     if self.TraceOn():
         print obj
     self.assertFalse(obj)
     # Do fuzz testing on the invalid obj, it should not crash lldb.
     import sb_lineentry
     sb_lineentry.fuzz_obj(obj)
示例#2
0
    def run_step_sequence(self, step_sequence):
        """This function takes a list of duples instructing how to run the program.  The first element in each duple is
           a source pattern for the target location, and the second is the operation that will take you from the current
           source location to the target location.  It will then run all the steps in the sequence.
           It will check that you arrived at the expected source location at each step, and that the stack depth changed 
           correctly for the operation in the sequence."""

        target_line_entry = lldb.SBLineEntry()
        target_line_entry.SetFileSpec(self.main_source_spec)

        for step_pattern in step_sequence:
            step_stop_line = line_number (self.main_source, step_pattern[0])
            target_line_entry.SetLine(step_stop_line)
            self.do_step (step_pattern[1], target_line_entry)
示例#3
0
    def run_step_sequence(self, step_sequence):
        """This function takes a list of duples instructing how to run the program.  The first element in each duple is
           a source pattern for the target location, and the second is the operation that will take you from the current
           source location to the target location.  It will then run all the steps in the sequence.
           It will check that you arrived at the expected source location at each step, and that the stack depth changed
           correctly for the operation in the sequence."""

        target_line_entry = lldb.SBLineEntry()
        target_line_entry.SetFileSpec(self.main_source_spec)

        test_stack_depth = True
        # Work around for <rdar://problem/16363195>, the darwin unwinder seems flakey about whether it duplicates the first frame
        # or not, which makes counting stack depth unreliable.
        if self.platformIsDarwin():
            test_stack_depth = False

        for step_pattern in step_sequence:
            step_stop_line = line_number(self.main_source, step_pattern[0])
            target_line_entry.SetLine(step_stop_line)
            self.do_step(step_pattern[1], target_line_entry, test_stack_depth)