summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2015-11-13 22:19:08 +0000
committerJim Ingham <jingham@apple.com>2015-11-13 22:19:08 +0000
commitdfe0e99517433156d6b5adb89d5fc20fa0e4bb42 (patch)
tree1949a6025b4b27d607b5defed48b5f100a7b9d06 /lldb/packages/Python/lldbsuite/test/functionalities
parent89d8ef7ee3007e39eff871e310086a90da46ab13 (diff)
downloadbcm5719-llvm-dfe0e99517433156d6b5adb89d5fc20fa0e4bb42.tar.gz
bcm5719-llvm-dfe0e99517433156d6b5adb89d5fc20fa0e4bb42.zip
Change the test to use the instruction list to get the consecutive addresses to break on. Rerunning
was being foiled by ASLR. llvm-svn: 253094
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py27
1 files changed, 9 insertions, 18 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
index 3fa3c6297df..5a91f0f7f94 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
@@ -19,7 +19,7 @@ class ConsecutiveBreakpoitsTestCase(TestBase):
def test (self):
self.build ()
self.consecutive_breakpoints_tests()
-
+
def consecutive_breakpoints_tests(self):
exe = os.path.join (os.getcwd(), "a.out")
@@ -40,24 +40,15 @@ class ConsecutiveBreakpoitsTestCase(TestBase):
thread = process.GetThreadAtIndex(0)
self.assertEqual(thread.GetStopReason(), lldb.eStopReasonBreakpoint)
- # Step to the next instruction
- thread.StepInstruction(False)
- self.assertEqual(thread.GetStopReason(), lldb.eStopReasonPlanComplete)
- address = thread.GetFrameAtIndex(0).GetPC()
-
- # Run the process until termination
- process.Continue()
-
- # Now launch the process again, and do not stop at entry point.
- process = target.LaunchSimple (None, None, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # We should be stopped at the first breakpoint
- thread = process.GetThreadAtIndex(0)
- self.assertEqual(thread.GetStopReason(), lldb.eStopReasonBreakpoint)
-
# Set breakpoint to the next instruction
- target.BreakpointCreateByAddress(address)
+ frame = thread.GetFrameAtIndex(0)
+
+ address = frame.GetPCAddress()
+ instructions = target.ReadInstructions(address, 2)
+ self.assertTrue(len(instructions) == 2)
+ address = instructions[1].GetAddress()
+
+ target.BreakpointCreateByAddress(address.GetLoadAddress(target))
process.Continue()
# We should be stopped at the second breakpoint
OpenPOWER on IntegriCloud