This option was added downstream in swift-lldb. This upstreams this option as it seems useful and also adds the missing tests.
- Group Reviewers
- rG87bc320b510e: [lldb] Add -m option to 'target modules dump symtab' to disable demangling
You could just make a YAML file with some symbols inside. That would isolate you from any host mangling specifics (which I think is a good thing, as this test is really about the command line option, and not mangling).
BTW, is it possible to prune the yaml to remove the stuff irrelevant for the test? I'm not that familiar with how macho2yaml works, but the equivalent elf representation of this can be as short as:
--- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_X86_64 Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x0000000000000010 Content: 554889E5897DFC5DC3 Symbols: - Name: _ZN3foo3barEi Type: STT_FUNC Section: .text Size: 0x0000000000000009 ...