This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
29 lines
782 B
Python
29 lines
782 B
Python
"""
|
|
Make sure that ivars of Objective-C++ classes are visible in LLDB.
|
|
"""
|
|
|
|
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class ObjCXXTestCase(TestBase):
|
|
def test_break(self):
|
|
"""Test ivars of Objective-C++ classes"""
|
|
if self.getArchitecture() == "i386":
|
|
self.skipTest("requires Objective-C 2.0 runtime")
|
|
|
|
self.build()
|
|
exe = self.getBuildArtifact("a.out")
|
|
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
|
|
|
|
lldbutil.run_break_set_by_source_regexp(
|
|
self, "breakpoint 1", num_expected_locations=1
|
|
)
|
|
|
|
self.runCmd("run", RUN_SUCCEEDED)
|
|
|
|
self.expect("expr f->f", "Found ivar in class", substrs=["= 3"])
|