mapfile-parser


Namemapfile-parser JSON
Version 2.4.0 PyPI version JSON
download
home_pagehttps://github.com/Decompollaborate/mapfile_parser
SummaryMap file parser library focusing decompilation projects
upload_time2024-03-25 21:37:03
maintainerNone
docs_urlNone
authorAnghelo Carvajal <angheloalf95@gmail.com>
requires_python>=3.8
licenseMIT
keywords mapfile parser decomp decompilation
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mapfile_parser

[![PyPI - Downloads](https://img.shields.io/pypi/dm/mapfile-parser)](https://pypi.org/project/mapfile-parser/)
[![GitHub License](https://img.shields.io/github/license/Decompollaborate/mapfile_parser)](https://github.com/Decompollaborate/mapfile_parser/releases/latest)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Decompollaborate/mapfile_parser)](https://github.com/Decompollaborate/mapfile_parser/releases/latest)
[![PyPI](https://img.shields.io/pypi/v/mapfile-parser)](https://pypi.org/project/mapfile-parser/)
![crate.io](https://img.shields.io/crates/dv/mapfile-parser)
[![GitHub contributors](https://img.shields.io/github/contributors/Decompollaborate/mapfile_parser?logo=purple)](https://github.com/Decompollaborate/mapfile_parser/graphs/contributors)

Map file parser library focusing decompilation projects.

This library is available for Python3 and Rust

## Features

- Fast parsing written in Rust.
- Support map formats:
  - GNU ld
  - clang lld
- Built-in cli utilities to process the parsed map file (see [Examples](#examples)).

## Installing

### Python version

See this package at <https://pypi.org/project/mapfile_parser/>.

The recommended way to install is using from the PyPi release, via `pip`:

```bash
python3 -m pip install -U mapfile_parser
```

If you use a `requirements.txt` file in your repository, then you can add
this library with the following line:

```txt
mapfile_parser>=2.4.0,<3.0.0
```

#### Development version

The unstable development version is located at the [develop](https://github.com/Decompollaborate/mapfile_parser/tree/develop)
branch. PRs should be made into that branch instead of the main one.

The recommended way to install a locally cloned repo is by passing the `-e`
(editable) flag to `pip`.

```bash
python3 -m pip install -e .
```

In case you want to mess with the latest development version without wanting to
clone the repository, then you could use the following command:

```bash
python3 -m pip uninstall mapfile_parser
python3 -m pip install git+https://github.com/Decompollaborate/mapfile_parser.git@develop
```

NOTE: Installing the development version is not recommended unless you know what
you are doing. Proceed at your own risk.

### Rust version

See this crate at <https://crates.io/crates/mapfile_parser>.

To add this library to your project using Cargo:

```bash
cargo add mapfile_parser
```

Or add the following line manually to your `Cargo.toml` file:

```toml
mapfile_parser = "2.4.0"
```

## Versioning and changelog

This library follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
We try to always keep backwards compatibility, so no breaking changes should
happen until a major release (i.e. jumping from 2.X.X to 3.0.0).

To see what changed on each release check either the [CHANGELOG.md](CHANGELOG.md)
file or check the [releases page on Github](https://github.com/Decompollaborate/mapfile_parser/releases).
You can also use [this link](https://github.com/Decompollaborate/mapfile_parser/releases/latest)
to check the latest release.

## Examples

Various cli examples are provided in the [frontends folder](src/mapfile_parser/frontends).
Most of them are re-implementations of already existing tools using this
library to show how to use this library and inspire new ideas.

The list can be checked in runtime with `python3 -m mapfile_parser --help`.

Each one of them can be executed with `python3 -m mapfile_parser utilityname`,
for example `python3 -m mapfile_parser pj64_syms`.

- `bss_check`: Check that globally visible bss has not been reordered.
- `first_diff`: Find the first difference(s) between the built ROM and the base
  ROM.
- `jsonify`: Converts a mapfile into a json format.
- `pj64_syms`: Produce a PJ64 compatible symbol map.
- `progress`: Computes current progress of the matched functions. Relies on a
  [splat](https://github.com/ethteck/splat) folder structure and each matched
  functions no longer having an `.s` file (i.e: delete the file after matching it).
- `sym_info`: Display various information about a symbol or address.
- `symbol_sizes_csv`: Produces a csv summarizing the files sizes by parsing a
  map file.
- `upload_frogress`: Uploads current progress (calculated by the `progress`
  utility) of the matched functions to [frogress](https://github.com/decompals/frogress).

None of the provided cli utilities are meant to be used directly on a command
line, because they need a large number of long parameters to them and every repo
has their own quirks which would need them to be adapted. Those have been
written mostly to facilitate people to write those utilities in a way which
accomodates their own repo.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Decompollaborate/mapfile_parser",
    "name": "mapfile-parser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mapfile, parser, decomp, decompilation",
    "author": "Anghelo Carvajal <angheloalf95@gmail.com>",
    "author_email": "Anghelo Carvajal <angheloalf95@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/8b/f6/5a270fd839b32c3d6cfd3d1cae78f8dbd39ee81ce328b11bc5986ee7d2ee/mapfile_parser-2.4.0.tar.gz",
    "platform": null,
    "description": "# mapfile_parser\n\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/mapfile-parser)](https://pypi.org/project/mapfile-parser/)\n[![GitHub License](https://img.shields.io/github/license/Decompollaborate/mapfile_parser)](https://github.com/Decompollaborate/mapfile_parser/releases/latest)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Decompollaborate/mapfile_parser)](https://github.com/Decompollaborate/mapfile_parser/releases/latest)\n[![PyPI](https://img.shields.io/pypi/v/mapfile-parser)](https://pypi.org/project/mapfile-parser/)\n![crate.io](https://img.shields.io/crates/dv/mapfile-parser)\n[![GitHub contributors](https://img.shields.io/github/contributors/Decompollaborate/mapfile_parser?logo=purple)](https://github.com/Decompollaborate/mapfile_parser/graphs/contributors)\n\nMap file parser library focusing decompilation projects.\n\nThis library is available for Python3 and Rust\n\n## Features\n\n- Fast parsing written in Rust.\n- Support map formats:\n  - GNU ld\n  - clang lld\n- Built-in cli utilities to process the parsed map file (see [Examples](#examples)).\n\n## Installing\n\n### Python version\n\nSee this package at <https://pypi.org/project/mapfile_parser/>.\n\nThe recommended way to install is using from the PyPi release, via `pip`:\n\n```bash\npython3 -m pip install -U mapfile_parser\n```\n\nIf you use a `requirements.txt` file in your repository, then you can add\nthis library with the following line:\n\n```txt\nmapfile_parser>=2.4.0,<3.0.0\n```\n\n#### Development version\n\nThe unstable development version is located at the [develop](https://github.com/Decompollaborate/mapfile_parser/tree/develop)\nbranch. PRs should be made into that branch instead of the main one.\n\nThe recommended way to install a locally cloned repo is by passing the `-e`\n(editable) flag to `pip`.\n\n```bash\npython3 -m pip install -e .\n```\n\nIn case you want to mess with the latest development version without wanting to\nclone the repository, then you could use the following command:\n\n```bash\npython3 -m pip uninstall mapfile_parser\npython3 -m pip install git+https://github.com/Decompollaborate/mapfile_parser.git@develop\n```\n\nNOTE: Installing the development version is not recommended unless you know what\nyou are doing. Proceed at your own risk.\n\n### Rust version\n\nSee this crate at <https://crates.io/crates/mapfile_parser>.\n\nTo add this library to your project using Cargo:\n\n```bash\ncargo add mapfile_parser\n```\n\nOr add the following line manually to your `Cargo.toml` file:\n\n```toml\nmapfile_parser = \"2.4.0\"\n```\n\n## Versioning and changelog\n\nThis library follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\nWe try to always keep backwards compatibility, so no breaking changes should\nhappen until a major release (i.e. jumping from 2.X.X to 3.0.0).\n\nTo see what changed on each release check either the [CHANGELOG.md](CHANGELOG.md)\nfile or check the [releases page on Github](https://github.com/Decompollaborate/mapfile_parser/releases).\nYou can also use [this link](https://github.com/Decompollaborate/mapfile_parser/releases/latest)\nto check the latest release.\n\n## Examples\n\nVarious cli examples are provided in the [frontends folder](src/mapfile_parser/frontends).\nMost of them are re-implementations of already existing tools using this\nlibrary to show how to use this library and inspire new ideas.\n\nThe list can be checked in runtime with `python3 -m mapfile_parser --help`.\n\nEach one of them can be executed with `python3 -m mapfile_parser utilityname`,\nfor example `python3 -m mapfile_parser pj64_syms`.\n\n- `bss_check`: Check that globally visible bss has not been reordered.\n- `first_diff`: Find the first difference(s) between the built ROM and the base\n  ROM.\n- `jsonify`: Converts a mapfile into a json format.\n- `pj64_syms`: Produce a PJ64 compatible symbol map.\n- `progress`: Computes current progress of the matched functions. Relies on a\n  [splat](https://github.com/ethteck/splat) folder structure and each matched\n  functions no longer having an `.s` file (i.e: delete the file after matching it).\n- `sym_info`: Display various information about a symbol or address.\n- `symbol_sizes_csv`: Produces a csv summarizing the files sizes by parsing a\n  map file.\n- `upload_frogress`: Uploads current progress (calculated by the `progress`\n  utility) of the matched functions to [frogress](https://github.com/decompals/frogress).\n\nNone of the provided cli utilities are meant to be used directly on a command\nline, because they need a large number of long parameters to them and every repo\nhas their own quirks which would need them to be adapted. Those have been\nwritten mostly to facilitate people to write those utilities in a way which\naccomodates their own repo.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Map file parser library focusing decompilation projects",
    "version": "2.4.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Decompollaborate/mapfile_parser/issues",
        "Homepage": "https://github.com/Decompollaborate/mapfile_parser"
    },
    "split_keywords": [
        "mapfile",
        " parser",
        " decomp",
        " decompilation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a5e505e340030515fd4ee369535d94a75eeb18719a89ff62ae116d8dfb1d473d",
                "md5": "060ee08fa0b19479f946826b4cb06787",
                "sha256": "cef94af43206c1bdf4a18307e7ba2473b2ead38d60bfb5f8b65df0c497673d8b"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "060ee08fa0b19479f946826b4cb06787",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1048554,
            "upload_time": "2024-03-25T21:36:43",
            "upload_time_iso_8601": "2024-03-25T21:36:43.060017Z",
            "url": "https://files.pythonhosted.org/packages/a5/e5/05e340030515fd4ee369535d94a75eeb18719a89ff62ae116d8dfb1d473d/mapfile_parser-2.4.0-cp37-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e2cd0c8e5a152b08e51030f1b37be7c9053086d61754dddbf20b6b42e21ea5a",
                "md5": "c9094fec7e6664978bfb631a18ca06d5",
                "sha256": "747b83727388654ab1455581d8d03e0bfe8429f7454ec8f814cba0dd7015301a"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "c9094fec7e6664978bfb631a18ca06d5",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 996162,
            "upload_time": "2024-03-25T21:36:44",
            "upload_time_iso_8601": "2024-03-25T21:36:44.996991Z",
            "url": "https://files.pythonhosted.org/packages/1e/2c/d0c8e5a152b08e51030f1b37be7c9053086d61754dddbf20b6b42e21ea5a/mapfile_parser-2.4.0-cp37-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5605727d9e2c32e2b64d15436ecbd7287fed2bb3b660b3e73e8bd1c12eedb20d",
                "md5": "e96aeb6e7a05b614d3f1a8645288e98d",
                "sha256": "024a1463a3d2e285e25fbfc1df30b49899243892135e17c8788e83930b30f5bc"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "e96aeb6e7a05b614d3f1a8645288e98d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1896957,
            "upload_time": "2024-03-25T21:36:46",
            "upload_time_iso_8601": "2024-03-25T21:36:46.714675Z",
            "url": "https://files.pythonhosted.org/packages/56/05/727d9e2c32e2b64d15436ecbd7287fed2bb3b660b3e73e8bd1c12eedb20d/mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b201feaa8e9285422b12c2a6dbf783f17ba6e1e302be7245ef3782e6930c2bdf",
                "md5": "f8c4eda1dbab6b98c8d783b569f1bb8d",
                "sha256": "25d3e562658d80d78d05818214eb0c655b7a1de0dc8bdcdb276aeb915f481e63"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "f8c4eda1dbab6b98c8d783b569f1bb8d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1851551,
            "upload_time": "2024-03-25T21:36:48",
            "upload_time_iso_8601": "2024-03-25T21:36:48.702347Z",
            "url": "https://files.pythonhosted.org/packages/b2/01/feaa8e9285422b12c2a6dbf783f17ba6e1e302be7245ef3782e6930c2bdf/mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0d2116bebd07c0669fed75e0343d7f27aa7529d58f070c5dfcda477f654e5c4c",
                "md5": "fbbc2355ec3bd41e499f4f6c7d4b60dd",
                "sha256": "26a7594b6ca2fb002c29676e13619bf28425548153370a2ac3d4b2936dc9352d"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "fbbc2355ec3bd41e499f4f6c7d4b60dd",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 2042000,
            "upload_time": "2024-03-25T21:36:51",
            "upload_time_iso_8601": "2024-03-25T21:36:51.618446Z",
            "url": "https://files.pythonhosted.org/packages/0d/21/16bebd07c0669fed75e0343d7f27aa7529d58f070c5dfcda477f654e5c4c/mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2d70db4acc0909eaca6c1b76f31f89776ca60fef29fc8ebad8fa7b2aae9959af",
                "md5": "15944f481cc2a704a2eae86d2b2d9b44",
                "sha256": "3bce0f0749a3da7fe93963590dfa7bef09678a27100122cc496825666e999385"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "15944f481cc2a704a2eae86d2b2d9b44",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 2137152,
            "upload_time": "2024-03-25T21:36:54",
            "upload_time_iso_8601": "2024-03-25T21:36:54.084490Z",
            "url": "https://files.pythonhosted.org/packages/2d/70/db4acc0909eaca6c1b76f31f89776ca60fef29fc8ebad8fa7b2aae9959af/mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6a91ac2d67ca307f0a3dbe11054c2785e8d1f2f356cf9c670f01238f2f204b42",
                "md5": "514a25eaf7f9c6fc9c5ec39662260998",
                "sha256": "10f41ff4942f503d2d9e1014ae58a7fff9db8e5f9b8369e436320c28e0b2d5e2"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "514a25eaf7f9c6fc9c5ec39662260998",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1941593,
            "upload_time": "2024-03-25T21:36:56",
            "upload_time_iso_8601": "2024-03-25T21:36:56.232913Z",
            "url": "https://files.pythonhosted.org/packages/6a/91/ac2d67ca307f0a3dbe11054c2785e8d1f2f356cf9c670f01238f2f204b42/mapfile_parser-2.4.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a78857f8261586d4c34f06c4fb07da7e5df8dec1230947cf2d13ff33a0559001",
                "md5": "09f48e5deae92c93296e7b0e9fa1f59c",
                "sha256": "912823e8aeca682d54da39f0416c823e5e619d594131f79dbc9a1d46df9df1f4"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
            "has_sig": false,
            "md5_digest": "09f48e5deae92c93296e7b0e9fa1f59c",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1936734,
            "upload_time": "2024-03-25T21:36:57",
            "upload_time_iso_8601": "2024-03-25T21:36:57.868567Z",
            "url": "https://files.pythonhosted.org/packages/a7/88/57f8261586d4c34f06c4fb07da7e5df8dec1230947cf2d13ff33a0559001/mapfile_parser-2.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a575a591145cb5044325266c9aa14cc56c32a3b4f905d215de1470671e18bb25",
                "md5": "f33e4949c667e59cfe4dd8901b808395",
                "sha256": "b179be43481de55440b5747bd62ae6e8de4b1a8893bc81ad13d3d651a2660144"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "f33e4949c667e59cfe4dd8901b808395",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 803040,
            "upload_time": "2024-03-25T21:36:59",
            "upload_time_iso_8601": "2024-03-25T21:36:59.617212Z",
            "url": "https://files.pythonhosted.org/packages/a5/75/a591145cb5044325266c9aa14cc56c32a3b4f905d215de1470671e18bb25/mapfile_parser-2.4.0-cp37-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "536053d9dec6b1a6a8ab4dc85eb9b04ba202d2e7166f020407a77248520f9831",
                "md5": "a73aa3a8410f972fc465274c6dd71443",
                "sha256": "38ef782bbdf3da2d8f60e62ec7ec0599d4b602bdbdd310af5803aabc355de2c7"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0-cp37-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a73aa3a8410f972fc465274c6dd71443",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 875455,
            "upload_time": "2024-03-25T21:37:01",
            "upload_time_iso_8601": "2024-03-25T21:37:01.243394Z",
            "url": "https://files.pythonhosted.org/packages/53/60/53d9dec6b1a6a8ab4dc85eb9b04ba202d2e7166f020407a77248520f9831/mapfile_parser-2.4.0-cp37-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8bf65a270fd839b32c3d6cfd3d1cae78f8dbd39ee81ce328b11bc5986ee7d2ee",
                "md5": "708c2f9924c91786547effbf0d4d429f",
                "sha256": "6358aef9cea6ee6858ecc25c1c332d06a273143edb333e10575a488cdd4aef0f"
            },
            "downloads": -1,
            "filename": "mapfile_parser-2.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "708c2f9924c91786547effbf0d4d429f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 39782,
            "upload_time": "2024-03-25T21:37:03",
            "upload_time_iso_8601": "2024-03-25T21:37:03.434270Z",
            "url": "https://files.pythonhosted.org/packages/8b/f6/5a270fd839b32c3d6cfd3d1cae78f8dbd39ee81ce328b11bc5986ee7d2ee/mapfile_parser-2.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 21:37:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Decompollaborate",
    "github_project": "mapfile_parser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        }
    ],
    "lcname": "mapfile-parser"
}
        
Elapsed time: 0.21997s