Files
clang-p2996/lldb/test/API/functionalities/target_var/TestTargetVar.py
Dave Lee 4cc8f2a017 [lldb][tests] Automatically call compute_mydir (NFC)
Eliminate boilerplate of having each test manually assign to `mydir` by calling
`compute_mydir` in lldbtest.py.

Differential Revision: https://reviews.llvm.org/D128077
2022-06-17 14:34:49 -07:00

23 lines
794 B
Python

"""
Test that target var can resolve complex DWARF expressions.
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class targetCommandTestCase(TestBase):
@skipUnlessDarwin
@skipIfDarwinEmbedded # needs x86_64
@skipIf(debug_info="gmodules") # not relevant
@skipIf(compiler="clang", compiler_version=['<', '7.0'])
def testTargetVarExpr(self):
self.build()
lldbutil.run_to_name_breakpoint(self, 'main')
self.expect("target variable i", substrs=['i', '42'])
self.expect("target variable var", patterns=['\(incomplete \*\) var = 0[xX](0)*dead'])
self.expect("target variable var[0]", error=True, substrs=["can't find global variable 'var[0]'"])