1 """Test that types defined in shared libraries work correctly."""
6 from lldbsuite.test.decorators import *
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test import lldbutil
11 class TestRealDefinition(TestBase):
13 mydir = TestBase.compute_mydir(__file__)
16 def test_frame_var_after_stop_at_implementation(self):
17 """Test that we can find the implementation for an objective C type"""
18 if self.getArchitecture() == 'i386':
19 self.skipTest("requires modern objc runtime")
21 self.shlib_names = ["libTestExt.dylib", "libTest.dylib"]
24 line = line_number('TestExt/TestExt.m', '// break here')
25 lldbutil.run_break_set_by_file_and_line(
26 self, 'TestExt.m', line, num_expected_locations=1, loc_exact=True)
28 self.runCmd("run", RUN_SUCCEEDED)
30 # The stop reason of the thread should be breakpoint.
31 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
33 'stop reason = breakpoint'])
35 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
36 substrs=[' resolved, hit count = 1'])
38 # This should display correctly.
41 "A simple expression should execute correctly",
45 def common_setup(self):
46 exe = self.getBuildArtifact("a.out")
47 target = self.dbg.CreateTarget(exe)
48 self.registerSharedLibrariesWithTarget(target, self.shlib_names)
50 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)