1 from __future__ import print_function
4 from lldbsuite.test.decorators import *
5 from lldbsuite.test.lldbtest import *
6 from lldbsuite.test import lldbutil
8 class ExprBug35310(TestBase):
10 mydir = TestBase.compute_mydir(__file__)
13 # Call super's setUp().
16 self.main_source = "main.cpp"
17 self.main_source_spec = lldb.SBFileSpec(self.main_source)
19 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
20 def test_issue35310(self):
21 """Test invoking functions with non-standard linkage names.
23 The GNU abi_tag extension used by libstdc++ is a common source
24 of these, but they could originate from other reasons as well.
28 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
29 '// Break here', self.main_source_spec)
30 frame = thread.GetFrameAtIndex(0)
32 value = frame.EvaluateExpression("a.test_abi_tag()")
33 self.assertTrue(value.IsValid())
34 self.assertTrue(value.GetError().Success())
35 self.assertEqual(value.GetValueAsSigned(0), 1)
37 value = frame.EvaluateExpression("a.test_asm_name()")
38 self.assertTrue(value.IsValid())
39 self.assertTrue(value.GetError().Success())
40 self.assertEqual(value.GetValueAsSigned(0), 2)