How to use the cxxfilt.InvalidName function in cxxfilt

To help you get started, we’ve selected a few cxxfilt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / tock-on-titan / tools / print_memory_usage.py View on Github external
# Initialized data: part of the flash image, then copied into RAM
        # on start. The .data section in normal hosted C.
        if segment == "relocate":
            try:
                demangled = parse_mangled_name(name)
                kernel_initialized.append((demangled, addr, size, 0))
            except cxxfilt.InvalidName:
                kernel_initialized.append((name, addr, size, 0))

        # Uninitialized data, stored in a zeroed RAM section. The
        # .bss section in normal hosted C.
        elif segment == "sram":
            try:
                demangled = parse_mangled_name(name)
                kernel_uninitialized.append((demangled, addr, size, 0))
            except cxxfilt.InvalidName:
                kernel_uninitialized.append((name, addr, size, 0))

        # Code and embedded data.
        elif segment == "text":
            # pylint: disable=anomalous-backslash-in-string
            match = re.search('\$(((\w+\.\.)+)(\w+))\$', name)
            if match != None:
                symbol = match.group(1)
                symbol = symbol.replace('..', '::')
                symbol = trim_hash_from_symbol(symbol)
                kernel_functions.append((symbol, addr, size, 0))
            else:
                try:
                    symbol = parse_mangled_name(name)
                    kernel_functions.append((symbol, addr, size, 0))
                except cxxfilt.InvalidName:

cxxfilt

Python interface to c++filt / abi::__cxa_demangle

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Popular cxxfilt functions

Similar packages