Package: mapfile-parser
mapfile_parserMap file parser library focusing decompilation projects.This library is available for Python3 and RustFeaturesFast parsing written in Rust.Support map formats:GNU ldclang lldBuilt-in cli utilities to process the parsed map file (seeExamples).InstallingPython versionSee this package athttps://pypi.org/project/mapfile_parser/.The recommended way to install is using from the PyPi release, viapip:python3-mpipinstall-Umapfile_parserIf you use arequirements.txtfile in your repository, then you can add
this library with the following line:mapfile_parser>=2.3.7,<3.0.0Development versionThe unstable development version is located at thedevelopbranch. 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 topip.python3-mpipinstall-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:python3-mpipuninstallmapfile_parser
python3-mpipinstallgit+https://github.com/Decompollaborate/mapfile_parser.git@developNOTE: Installing the development version is not recommended unless you know what
you are doing. Proceed at your own risk.Rust versionSee this crate athttps://crates.io/crates/mapfile_parser.To add this library to your project using Cargo:cargoaddmapfile_parserOr add the following line manually to yourCargo.tomlfile:mapfile_parser="2.3.5"Versioning and changelogThis library followsSemantic Versioning.
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 theCHANGELOG.mdfile or check thereleases page on Github.
You can also usethis linkto check the latest release.ExamplesVarious cli examples are provided in thefrontends folder.
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 withpython3 -m mapfile_parser --help.Each one of them can be executed withpython3 -m mapfile_parser utilityname,
for examplepython3 -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 asplatfolder structure and each matched
functions no longer having an.sfile (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 theprogressutility) of the matched functions tofrogress.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.