{"id":24007,"library":"mapfile-parser","title":"mapfile-parser","description":"Map file parser library focused on decompilation projects. Supports GNU, mwld, and other map file formats. Current version: 2.12.1. Release cadence: frequent (multiple releases per month).","status":"active","version":"2.12.1","language":"python","source_language":"en","source_url":"https://github.com/Decompollaborate/mapfile_parser","tags":["decompilation","mapfile","n64","psx","game-reverse-engineering"],"install":[{"cmd":"pip install mapfile-parser","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"MapFile","correct":"from mapfile_parser import MapFile"},{"note":"","wrong":"","symbol":"SymbolTypes","correct":"from mapfile_parser import SymbolTypes"}],"quickstart":{"code":"from mapfile_parser import MapFile\n\n# Parse a map file (e.g., GNU .map or mwld .map)\nmf = MapFile()\nmf.readMapFile('path/to/mapfile.map')\nprint(mf)\n\n# Access symbols\nfor segment in mf.segments:\n    for section in segment.sections:\n        for symbol in section.symbols:\n            if symbol.name and 'NON_MATCHING' not in symbol.name:\n                print(symbol.name, hex(symbol.vram))","lang":"python","description":"Basic parsing of a map file and iterating over symbols."},"warnings":[{"fix":"Manually check the inferred addresses by dumping the parsed sections.","message":"When using GNU mapfiles, the library may automatically infer ROM addresses for sections/segments even if not explicitly present. This can lead to incorrect addresses if the mapfile is incomplete. Always verify against original binary.","severity":"gotcha","affected_versions":">=2.9.3"},{"fix":"Use `MapFile(read_statics=False)` to disable static inference, or adjust via the `SymbolTypes` enum.","message":"Static symbols are inferred by default, which may cause false positives or missing symbols. The inference can be controlled via options.","severity":"gotcha","affected_versions":">=2.11.0"},{"fix":"Rename any conflicting scripts or use `python3 -m mapfile_parser` instead of the bare command.","message":"In version 2.12.0, a CLI script `mapfile_parser` is installed via pip entry point. This may conflict with existing scripts named 'mapfile_parser' in the user's PATH.","severity":"breaking","affected_versions":">=2.12.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install the library: pip install mapfile-parser","cause":"The package is installed under the name 'mapfile-parser', but Python expects 'mapfile_parser'.","error":"ModuleNotFoundError: No module named 'mapfile_parser'"},{"fix":"Check the installed version: pip show mapfile-parser. For >=2.9.0, use `MapFile.readMapFile(path)`. For older versions, refer to documentation.","cause":"Older versions used a different method name; the API may have changed.","error":"AttributeError: 'MapFile' object has no attribute 'readMapFile'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}