[AMDGPU] Add True16 register classes.
[llvm-project.git] / lldb / test / API / commands / expression / result_numbering / TestResultNumbering.py
blobc6d4ed0c9a88c163659b72cf5a32c0576c8c0777
1 """
2 Make sure running internal expressions doesn't
3 influence the result variable numbering.
4 """
7 import lldb
8 import lldbsuite.test.lldbutil as lldbutil
9 from lldbsuite.test.lldbtest import *
12 class TestExpressionResultNumbering(TestBase):
13 NO_DEBUG_INFO_TESTCASE = True
15 def test_sample_rename_this(self):
16 self.build()
17 self.main_source_file = lldb.SBFileSpec("main.c")
18 self.do_numbering_test()
20 def do_numbering_test(self):
21 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
22 self, "Set a breakpoint here", self.main_source_file
25 bkpt = target.BreakpointCreateBySourceRegex(
26 "Add conditions to this breakpoint", self.main_source_file
28 self.assertEqual(bkpt.GetNumLocations(), 1, "Set the breakpoint")
30 bkpt.SetCondition("call_me(value) < 6")
32 # Get the number of the last expression:
33 result = thread.frames[0].EvaluateExpression("call_me(200)")
34 self.assertSuccess(result.GetError(), "Our expression succeeded")
35 name = result.GetName()
36 ordinal = int(name[1:])
38 process.Continue()
40 # The condition evaluation had to run a 4 expressions, but we haven't
41 # run any user expressions.
42 result = thread.frames[0].EvaluateExpression("call_me(200)")
43 self.assertSuccess(
44 result.GetError(), "Our expression succeeded the second time"
46 after_name = result.GetName()
47 after_ordinal = int(after_name[1:])
48 self.assertEqual(ordinal + 1, after_ordinal)