2 Test 'target modules dump symtab -m' doesn't demangle symbols.
5 from lldbsuite.test.decorators import *
6 from lldbsuite.test.lldbtest import *
7 from lldbsuite.test import lldbutil
9 class TestCase(TestBase):
11 mydir = TestBase.compute_mydir(__file__)
15 src_dir = self.getSourceDir()
16 yaml_path = os.path.join(src_dir, "a.yaml")
17 yaml_base, ext = os.path.splitext(yaml_path)
18 obj_path = self.getBuildArtifact("main.o")
19 self.yaml2obj(yaml_path, obj_path)
21 # Create a target with the object file we just created from YAML
22 target = self.dbg.CreateTarget(obj_path)
23 self.assertTrue(target, VALID_TARGET)
25 # First test that we demangle by default and our mangled symbol isn't in the output.
26 self.expect("target modules dump symtab", substrs=["foo::bar(int)"])
27 self.expect("target modules dump symtab", matching=False, substrs=["_ZN3foo3barEi"])
29 # Turn off demangling and make sure that we now see the mangled name in the output.
30 self.expect("target modules dump symtab -m", substrs=["_ZN3foo3barEi"])