577753c04977407301f076636708b6bf6b9de207
[openbsd] /
1 """
2 Test that we can p *objcObject
3 """
4
5
6
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
11
12
13 class PersistObjCPointeeType(TestBase):
14
15     mydir = TestBase.compute_mydir(__file__)
16
17     def setUp(self):
18         # Call super's setUp().
19         TestBase.setUp(self)
20         # Find the line number to break for main.cpp.
21         self.line = line_number('main.m', '// break here')
22
23     @skipUnlessDarwin
24     @skipIf(archs=["i386", "i686"])
25     @skipIf(debug_info="gmodules", archs=['arm64', 'armv7', 'armv7k', 'arm64e', 'arm64_32'])  # compile error with gmodules for iOS
26     def test_with(self):
27         """Test that we can p *objcObject"""
28         self.build()
29
30         def cleanup():
31             pass
32
33         # Execute the cleanup function during test case tear down.
34         self.addTearDownHook(cleanup)
35
36         self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
37
38         lldbutil.run_break_set_by_file_and_line(
39             self, "main.m", self.line, loc_exact=True)
40
41         self.runCmd("run", RUN_SUCCEEDED)
42
43         self.expect("p *self", substrs=['_sc_name = nil',
44                                         '_sc_name2 = nil',
45                                         '_sc_name3 = nil',
46                                         '_sc_name4 = nil',
47                                         '_sc_name5 = nil',
48                                         '_sc_name6 = nil',
49                                         '_sc_name7 = nil',
50                                         '_sc_name8 = nil'])