brintos

brintos / llvm-project-archived public Read only

0
0
Text · 910 B · 6f7ef24 Raw
25 lines · python
1import lldbsuite.test.lldbutil as lldbutil2from lldbsuite.test.lldbtest import *3 4 5class TestCase(TestBase):6    def test_functions_having_dlang_mangling_prefix(self):7        """8        Ensure C functions with a '_D' prefix alone are not mistakenly treated9        as a Dlang mangled name. A proper Dlang mangling will have digits10        immediately following the '_D' prefix.11        """12        self.build()13        _, _, thread, _ = lldbutil.run_to_name_breakpoint(self, "_Dfunction")14        frame = thread.frame[0]15 16        symbol = frame.symbol17        # On Windows the function does not have an associated symbol.18        if symbol.IsValid():19            self.assertFalse(symbol.mangled)20            self.assertEqual(symbol.GetDisplayName(), "_Dfunction")21 22        function = frame.function23        self.assertFalse(function.mangled)24        self.assertEqual(function.GetDisplayName(), "_Dfunction")25