Currently failing with the following when building the test file: ``` C:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe lib.o -gdwarf -O0 -m64 -IC:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb/include -IC:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\API\lang\cpp\expr-definition-in-dylib -IC:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\packages\Python\lldbsuite\test\make -include C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\packages\Python\lldbsuite\test\make/test_common.h -fno-limit-debug-info -fuse-ld=lld --driver-mode=g++ -shared -o "lib.dll" lld-link: warning: section name .debug_abbrev is longer than 8 characters and will use a non-standard string table lld-link: warning: section name .debug_info is longer than 8 characters and will use a non-standard string table lld-link: warning: section name .debug_line is longer than 8 characters and will use a non-standard string table lld-link: warning: section name .debug_str is longer than 8 characters and will use a non-standard string table C:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe main.o -L. -llib -gdwarf -O0 -m64 -IC:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb/include -IC:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\API\lang\cpp\expr-definition-in-dylib -IC:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\packages\Python\lldbsuite\test\make -include C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\packages\Python\lldbsuite\test\make/test_common.h -fno-limit-debug-info -fuse-ld=lld --driver-mode=g++ -o "a.out" lld-link: error: undefined symbol: public: int __cdecl Foo::method(void) >>> referenced by main.o:(main) clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile.rules:531: a.out] Error 1 make: Leaving directory 'C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/lang/cpp/expr-definition-in-dylib/TestExprDefinitionInDylib.test' ``` Skip for now
34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class ExprDefinitionInDylibTestCase(TestBase):
|
|
NO_DEBUG_INFO_TESTCASE = True
|
|
|
|
@skipIfWindows
|
|
def test(self):
|
|
"""
|
|
Tests that we can call functions whose definition
|
|
is in a different LLDB module than it's declaration.
|
|
"""
|
|
self.build()
|
|
|
|
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
|
|
self.assertTrue(target, VALID_TARGET)
|
|
|
|
env = self.registerSharedLibrariesWithTarget(target, ["lib"])
|
|
|
|
breakpoint = lldbutil.run_break_set_by_file_and_line(
|
|
self, "main.cpp", line_number("main.cpp", "return")
|
|
)
|
|
|
|
process = target.LaunchSimple(None, env, self.get_process_working_directory())
|
|
|
|
self.assertIsNotNone(
|
|
lldbutil.get_one_thread_stopped_at_breakpoint_id(self.process(), breakpoint)
|
|
)
|
|
|
|
self.expect_expr("f.method()", result_value="-72", result_type="int")
|