brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f67d933 Raw
30 lines · python
1import lldb2from lldbsuite.test.decorators import *3from lldbsuite.test.lldbtest import *4from lldbsuite.test import lldbutil5 6 7class OdrHandlingWithDylibTestCase(TestBase):8    @skipIf(9        bugnumber="https://github.com/llvm/llvm-project/issues/50375, rdar://135551810"10    )11    def test(self):12        """13        Tests that the expression evaluator is able to deal with types14        whose definitions conflict across multiple LLDB modules (in this15        case the definition for 'class Service' in the main executable16        has an additional field compared to the definition found in the17        dylib). This causes the ASTImporter to detect a name conflict18        while importing 'Service'. With LLDB's liberal ODRHandlingType19        the ASTImporter happily creates a conflicting AST node for20        'Service' in the scratch ASTContext, leading to a crash down21        the line.22        """23        self.build()24 25        lldbutil.run_to_source_breakpoint(26            self, "plugin_entry", lldb.SBFileSpec("plugin.cpp")27        )28 29        self.expect_expr("*gProxyThis")30