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 def test_issue35310(self):
20 """Test invoking functions with non-standard linkage names.
22 The GNU abi_tag extension used by libstdc++ is a common source
23 of these, but they could originate from other reasons as well.
27 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
28 '// Break here', self.main_source_spec)
29 frame = thread.GetFrameAtIndex(0)
31 value = frame.EvaluateExpression("a.test_abi_tag()")
32 self.assertTrue(value.IsValid())
33 self.assertTrue(value.GetError().Success())
34 self.assertEqual(value.GetValueAsSigned(0), 1)
36 value = frame.EvaluateExpression("a.test_asm_name()")
37 self.assertTrue(value.IsValid())
38 self.assertTrue(value.GetError().Success())
39 self.assertEqual(value.GetValueAsSigned(0), 2)