50 lines · python
1"""2Make sure 'frame var' using DIL parser/evaultor works for local variables.3"""4 5import lldb6from lldbsuite.test.lldbtest import *7from lldbsuite.test.decorators import *8from lldbsuite.test import lldbutil9 10import os11import shutil12import time13 14class TestFrameVarDILMemberOfInheritance(TestBase):15 # If your test case doesn't stress debug info, then16 # set this to true. That way it won't be run once for17 # each debug info format.18 NO_DEBUG_INFO_TESTCASE = True19 20 def test_frame_var(self):21 self.build()22 lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here",23 lldb.SBFileSpec("main.cpp"))24 25 self.expect("settings set target.experimental.use-DIL true",26 substrs=[""])27 self.expect_var_path("a.a_", value="1")28 self.expect_var_path("b.b_", value="2")29 self.expect_var_path("c.a_", value="1")30 self.expect_var_path("c.b_", value="2")31 self.expect_var_path("c.c_", value="3")32 self.expect_var_path("d.a_", value="1")33 self.expect_var_path("d.b_", value="2")34 self.expect_var_path("d.c_", value="3")35 self.expect_var_path("d.d_", value="4")36 self.expect_var_path("d.fa_.a_", value="5")37 38 self.expect_var_path("plugin.x", value="1")39 self.expect_var_path("plugin.y", value="2")40 41 self.expect_var_path("engine.x", value="1")42 self.expect_var_path("engine.y", value="2")43 self.expect_var_path("engine.z", value="3")44 45 self.expect_var_path("parent_base->x", value="1")46 self.expect_var_path("parent_base->y", value="2")47 self.expect_var_path("parent->x", value="1")48 self.expect_var_path("parent->y", value="2")49 self.expect_var_path("parent->z", value="3")50