skillfed

cxxfilt

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

cxxfilt v0.3.0 887.0K downloads/30d#4,809 on PyPI39
Permissive license BSD AGING released

What it is and what it does

cxxfilt is a thin Python wrapper around the C++ standard library's abi::__cxa_demangle function, which converts mangled C++ symbol names into human-readable form. When you compile C++ code, the compiler mangles function and class names to encode type information; this package reverses that process so you can read stack traces, debug output, or binary introspection results.

The package provides a simple demangle() function for string input and demangleb() for bytes, plus a Demangler class for custom library selection. It handles both external symbols (the default) and internal symbols when requested, and raises InvalidName for invalid input. Since it depends only on system C/C++ libraries already present on Unix systems, installation is straightforward with no Python dependencies.

Use it for:

  • Decode C++ symbol names in stack traces or crash dumps for debugging compiled extensions or native libraries.
  • Parse output from tools like nm or objdump that list mangled C++ symbols in binaries.
  • Inspect and log readable names when introspecting C++ libraries loaded via ctypes or cffi.
  • Build tooling that processes C++ build artifacts and needs human-readable symbol information.
  • Demangle internal C++ symbols when analyzing template instantiations or nested class definitions.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Demangle C++ symbol names by wrapping the abi::__cxa_demangle interface, converting mangled names like _ZNSt22condition_variable_anyD2Ev into readable C++ signatures.

Yes, if you work with C++ interop or native debugging on Unix systems. The package is stable, has no dependencies, and solves a specific problem well. However, maintenance is aging (last update 2021); if you need active support or compatibility guarantees beyond Python 3.9, verify first. Not usable on Windows.

Install

cxxfilt on PyPI

pip

pip install cxxfilt

uv

uv add cxxfilt

poetry

poetry add cxxfilt

Installing cxxfilt

Before you install

Low install friction with no runtime dependencies. Last release was in 2021 and the repository is not archived, but the package has not been updated in several years; maintenance is aging.

License in practice

BSD license is permissive; you can use this package in most commercial and open-source projects without significant legal constraints.

Quickstart

pip install cxxfilt

import cxxfilt
print(cxxfilt.demangle('_ZNSt22condition_variable_anyD2Ev'))
# Output: std::condition_variable_any::~condition_variable_any()

Requires libc and libc++/libstdc++ to be available on the system; will not work on Windows. Python 3.6 or greater.

Verify before relying

  • Whether the package works reliably with Python versions beyond those listed in classifiers (3.6 through 3.9)
  • Whether custom Demangler objects can reliably locate C/C++ libraries on all supported Unix systems

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 1,819 days since the last release
Last repo commit
First released
Downloads 887,005/month — #4,809 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cxxfilt-0.3.0-py2.py3-none-any.whl

Keywords: c++, c++filt, name, mangling

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build Tools

Tags

c++ symbol demanglingdemangle mangled namesc++filt python wrapperabi cxa demangledecode c++ symbolsname mangling resolutionc++ name demangler
c++-interopdebuggingsymbol-resolution

More Build Tools packages