2 Tests expressions evaluation when the breakpoint on module's entry is set.
6 import lldbsuite
.test
.lldbutil
as lldbutil
7 from lldbsuite
.test
.lldbtest
import *
10 class ExprEntryBPTestCase(TestBase
):
11 NO_DEBUG_INFO_TESTCASE
= True
13 def test_expr_entry_bp(self
):
14 """Tests expressions evaluation when the breakpoint on module's entry is set."""
16 self
.main_source_file
= lldb
.SBFileSpec("main.c")
18 (target
, process
, thread
, bkpt
) = lldbutil
.run_to_source_breakpoint(
19 self
, "Set a breakpoint here", self
.main_source_file
22 self
.assertEqual(1, bkpt
.GetNumLocations())
24 bkpt
.GetLocationAtIndex(0)
27 .GetObjectFileEntryPointAddress()
29 self
.assertTrue(entry
.IsValid(), "Can't get a module entry point")
31 entry_bp
= target
.BreakpointCreateBySBAddress(entry
)
33 entry_bp
.IsValid(), "Can't set a breakpoint on the module entry point"
36 self
.expect_expr("sum(7, 1)", result_type
="int", result_value
="8")