[AMDGPU] Add True16 register classes.
[llvm-project.git] / lldb / test / API / commands / expression / entry-bp / TestExprEntryBP.py
blob1e7882b4d023673994093cc752242a14c2feae49
1 """
2 Tests expressions evaluation when the breakpoint on module's entry is set.
3 """
5 import lldb
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."""
15 self.build()
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())
23 entry = (
24 bkpt.GetLocationAtIndex(0)
25 .GetAddress()
26 .GetModule()
27 .GetObjectFileEntryPointAddress()
29 self.assertTrue(entry.IsValid(), "Can't get a module entry point")
31 entry_bp = target.BreakpointCreateBySBAddress(entry)
32 self.assertTrue(
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")