Skip to main content

Demangle C++ symbols using LLVM's C++ ABI demangler

Project description

pycxxfilt

Version Supported Versions OpenSSF Scorecard

Demangle C++ symbols using LLVM's IA-64 C++ ABI demangler.

pycxxfilt is a Python C extension that wraps the C++ name demangler from LLVM's libcxxabi. It handles the name mangling scheme defined by the Itanium C++ ABI, which is the standard used by GCC (3.0+), Clang (1.0+), and other compilers on most platforms. The demangler source is shipped directly, so no external C++ libraries are required at build time or runtime.

Installation

pip install pycxxfilt

Wheels are available for Linux (x86_64, aarch64, ppc64le, s390x), macOS (x86_64, arm64), and Windows (AMD64). The extension uses the Python stable ABI (abi3), so a single wheel works with Python 3.11 and later.

Usage

Python API

import pycxxfilt

pycxxfilt.demangle("_Z3fooi")          # 'foo(int)'
pycxxfilt.demangle("_ZN3Foo3barEv")    # 'Foo::bar()'
pycxxfilt.demangle("_ZSt4cout")        # 'std::cout'
pycxxfilt.demangle("not_mangled")      # None

demangle() returns the demangled name as a string, or None if the input is not a valid mangled symbol.

Command line

$ python -m pycxxfilt _Z3fooi _ZN3Foo3barEv _ZSt4cout not_mangled
foo(int)
Foo::bar()
std::cout
not_mangled

Symbols that are not valid mangled names are printed as-is.

Comparison with cxxfilt

The cxxfilt package uses ctypes to call __cxa_demangle from the system's libstdc++.so. This means it depends on a C++ runtime library being installed and available at runtime, and it is not available on Windows.

pycxxfilt takes a different approach: it ships a vendored copy of LLVM's __cxa_demangle implementation and compiles it into a C extension module. This makes it self-contained with no runtime dependency on any system C++ library, and it works on Linux, macOS, and Windows.

License

The project code is licensed under the Apache License 2.0.

The vendored LLVM demangler is licensed under the Apache License 2.0 with LLVM Exceptions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycxxfilt-0.1.0.tar.gz (654.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pycxxfilt-0.1.0-cp311-cp311-win_amd64.whl (64.0 kB view details)

Uploaded CPython 3.11Windows x86-64

pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_s390x.whl (1.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ s390x

pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ppc64le

pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (80.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl (85.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ s390xmanylinux: glibc 2.28+ s390x

pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl (85.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ ppc64lemanylinux: glibc 2.28+ ppc64le

pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (78.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

pycxxfilt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (69.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pycxxfilt-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (70.7 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file pycxxfilt-0.1.0.tar.gz.

File metadata

  • Download URL: pycxxfilt-0.1.0.tar.gz
  • Upload date:
  • Size: 654.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pycxxfilt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12072bb80b918847df4bc97ad18a8c75ee5a04dd278a66f5c45fef0d4c0fb35f
MD5 4ffd57a99b01efb7cc7f5f6759d520be
BLAKE2b-256 484849d36470919b0615500ede5171a8ee058fa40f710a2768862eae69187f77

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0.tar.gz:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pycxxfilt-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 64.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 eaedfc3411f458aaa5fab78aab989c4c011c81e3cb4a2535c3e0b7cfebbe8fd2
MD5 e223a524b881eb496799967ef851ef6f
BLAKE2b-256 88d64ab10defbafc1610f0038f260171eb1a4ac9837f8958479842e77f1d20a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b79da5fee1de7a02c67716525ed5d759e523b406467aedd92053a5cf0d0054cd
MD5 73bad8dfd46fb5d2487a695e261d550f
BLAKE2b-256 7cff9be05334b876946da588f804bddb334d1818b48145a762f560881ddb4c3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_s390x.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 f92dd5fa4e062dcbc31b4e3df1a74661c6c3958a2df2bf0725b626813e36522b
MD5 931a67463eea494e0b0ca8ae9e44da58
BLAKE2b-256 e3ca7e1470fb2360a0ec591b217cc9604e1ef65d1023fc39b77b0fb390b1ec29

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_s390x.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 13e5074fb274d5a2e55d9afff4bb7c802ef01c46a9dedc9afca3a2601e70a1e1
MD5 a96aedaf237ace7980cbc6f732b41a17
BLAKE2b-256 31e8bc9fe7df3dca76b77e848b00e2b9f93a0e28cd939465d9180e9729a62f69

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 de7be50d14c763c3b4c6776eacd7bdf07cbfdd97eabdbc1a1fbd716efa0c69c8
MD5 25ba0b4492639f0ae1d62fb372187fb8
BLAKE2b-256 e9f3c06c188f63912442ca965ae4596b080947368004940d8286080c21c68ee3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-musllinux_1_2_aarch64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1cc76349948de08d77443cf54e87f0be8a3c3505184fefd59c7eea8a69aefe82
MD5 484f963ac6c26abf61cecc9c4d4ff874
BLAKE2b-256 a0c9382f0478456363f91100cb697cef5a97fe8a122f310ceb530a4db7176c37

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 6673ed120cca0e3fad5f195d48202440ede88a161b4ba978322adcf8be71cdc7
MD5 a7d3c31099c7de4be5875f5d944218f0
BLAKE2b-256 1686ccbe0362e22ff9aa8df44c2fb086e56c22624e52a2d4957078ce072a22c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 a01411fd6fd2d836965a36d3b8dd9c077c4f43992d1c913c4cae38f3a2b512c3
MD5 ddb57b29eff96f046f4519df67d04a43
BLAKE2b-256 c8b9084add14c9f30e0f99093f3248a086c1ff49b019199be3c0ff6020521a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 410a5d137a41a0c760dc19c0f7a9b8973dc2b9e4cba65360340a6c5fb3d1c4ca
MD5 8e12ed9c42a4c0b96f19a0199e23dbab
BLAKE2b-256 047e171df94bca557ae9557fdd54365857e5691eeff5d4bf6507a96c982fd3b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08cb2658c0c8c18e700eb2b8d4cf34ada2ec92046fa242fe248c59fdbc3115fd
MD5 2615ade5c6a535f89ef2f6a46ca9e587
BLAKE2b-256 b81909095e6689210374189b9fce79a5f6deec760faecd8b25344e040100d04e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycxxfilt-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pycxxfilt-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3332b4dcce647625d63243aa3efba9b9bdb15c40cb24e0bcc8dc1eb4290cc682
MD5 adbfb8b5af02d0a5a383502bf8047e4d
BLAKE2b-256 c71d0b75832b9824ab1b14c40a5e4a91b1e892a09f0ede956c291817090afcd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxxfilt-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: build.yml on tiran/pycxxfilt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page