summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
index 00ddc628607..4dfeae3f5e1 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
@@ -62,12 +62,11 @@ class StepOverBreakpointsTestCase(TestBase):
instructions = function.GetInstructions(self.target)
addr_1 = self.breakpoint1.GetLocationAtIndex(0).GetAddress()
addr_4 = self.breakpoint4.GetLocationAtIndex(0).GetAddress()
- for i in range(instructions.GetSize()) :
- addr = instructions.GetInstructionAtIndex(i).GetAddress()
- if (addr == addr_1) : index_1 = i
- if (addr == addr_4) : index_4 = i
- steps_expected = index_4 - index_1
+ # if third argument is true then the count will be the number of
+ # instructions on which a breakpoint can be set.
+ # start = addr_1, end = addr_4, canSetBreakpoint = True
+ steps_expected = instructions.GetInstructionsCount(addr_1, addr_4, True)
step_count = 0
# Step from breakpoint_1 to breakpoint_4
while True:
OpenPOWER on IntegriCloud