• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2Test that target var can resolve complex DWARF expressions.
3"""
4
5import lldb
6from lldbsuite.test.decorators import *
7from lldbsuite.test.lldbtest import *
8from lldbsuite.test import lldbutil
9
10
11class targetCommandTestCase(TestBase):
12
13    mydir = TestBase.compute_mydir(__file__)
14
15    @skipUnlessDarwin
16    @skipIfDarwinEmbedded           # needs x86_64
17    @skipIf(debug_info="gmodules")  # not relevant
18    @skipIf(compiler="clang", compiler_version=['<', '7.0'])
19    def testTargetVarExpr(self):
20        self.build()
21        lldbutil.run_to_name_breakpoint(self, 'main')
22        self.expect("target variable i", substrs=['i', '42'])
23        self.expect("target variable var", patterns=['\(incomplete \*\) var = 0[xX](0)*dead'])
24        self.expect("target variable var[0]", error=True, substrs=["can't find global variable 'var[0]'"])
25