objutils 0.10.19__tar.gz → 0.10.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {objutils-0.10.19 → objutils-0.10.20}/.idea/objutils@1.iml +1 -1
- {objutils-0.10.19 → objutils-0.10.20}/.pre-commit-config.yaml +3 -3
- {objutils-0.10.19 → objutils-0.10.20}/PKG-INFO +2 -1
- {objutils-0.10.19 → objutils-0.10.20}/objutils/__init__.py +1 -1
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/__init__.py +261 -198
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/encoding.py +41 -27
- {objutils-0.10.19 → objutils-0.10.20}/objutils/elf/__init__.py +83 -65
- objutils-0.10.20/objutils/extensions/wrapper.cpp +152 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_elf_arm_attrs.py +15 -15
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_elf_extract.py +13 -13
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_elf_info.py +53 -53
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_elf_syms.py +28 -28
- {objutils-0.10.19 → objutils-0.10.20}/objutils/utils/__init__.py +5 -1
- {objutils-0.10.19 → objutils-0.10.20}/objutils/version.py +1 -1
- {objutils-0.10.19 → objutils-0.10.20}/poetry.lock +135 -1
- {objutils-0.10.19 → objutils-0.10.20}/pyproject.toml +3 -2
- objutils-0.10.19/objutils/extensions/wrapper.cpp +0 -58
- {objutils-0.10.19 → objutils-0.10.20}/.clang-format +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.codacy.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.codeclimate.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.coveralls.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/FUNDING.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/ISSUE_TEMPLATE/documentation.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/ISSUE_TEMPLATE.md +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/copilot-instructions.md +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.github/workflows/pythonapp.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.gitignore +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/.gitignore +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/copilot.data.migration.ask2agent.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/deployment.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/misc.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/modules.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/pyLspTools.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/pyProjectModel.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.idea/vcs.xml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.pylintrc +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.readthedocs.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/.travis.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/CMakeLists.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/CODE_OF_CONDUCT.md +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/CONTRIBUTORS +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/LICENSE +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/MANIFEST.in +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/PULL_REQUEST_TEMPLATE.md +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/appveyor.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/bandit.yml +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/Data_Formats.pdf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/ELF_Format.pdf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/KNOWN_GOOD_DWARF_REFERENCE.md +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/README.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/apidoc.sh +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/conf.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.buildinfo +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.buildinfo.bak +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/README.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/environment.pickle +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/howto.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/index.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/installation.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/modules.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/objutils.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/objutils.elf.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/scripts.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/session.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/.doctrees/tutorial.doctree +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/README.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_images/objutils_basic.png +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/index.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/ash.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/binfile.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/checksums.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/cosmac.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/elf/defs.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/elf.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/emon52.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/etek.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/exceptions.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/fpc.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/hexdump.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/hexfile.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/ihex.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/image.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/logger.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/mostec.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/pickleif.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/rca.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/readers.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/registry.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/section.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/sig.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/srec.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/tek.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/titxt.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils/utils.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_modules/objutils.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/README.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/howto.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/index.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/installation.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/modules.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/objutils.elf.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/objutils.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/scripts.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/session.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_sources/tutorial.rst.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/alabaster.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/basic.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/check-solid.svg +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/clipboard.min.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/copy-button.svg +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/copybutton.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/copybutton.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/copybutton_funcs.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/custom.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/doctools.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/documentation_options.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/file.png +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/github-banner.svg +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/language_data.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/minus.png +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/plus.png +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/pygments.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/scripts/bootstrap.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/scripts/fontawesome.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/scripts/fontawesome.js.LICENSE.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/scripts/pydata-sphinx-theme.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/searchtools.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/styles/pydata-sphinx-theme.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/styles/theme.css +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/_static/webpack-macros.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/genindex.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/howto.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/index.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/installation.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/modules.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/objects.inv +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/objutils.elf.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/objutils.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/py-modindex.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/scripts.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/search.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/searchindex.js +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/session.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/docs/_build/html/tutorial.html +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/elf-64-gen.pdf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/example0.srec +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/howto.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/index.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/installation.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/make.bat +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/modules.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/objutils.elf.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/objutils.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/objutils_banner.png +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/objutils_basic.png +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/objutils_dark.jpg +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/objutils_social.jpg +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/requirements.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/scripts.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/session.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/tutorial.rst +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/docs/tutorial1.ipynb +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/.coveragerc +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/.vscode/launch.json +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/.vscode/settings.json +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/a2l_test.shf +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/ash.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/binfile.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/checksums.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/cosmac.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/attrparser.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/c_generator.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/constants.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/lineprog.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/readers.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/sm.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/dwarf/traverser.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/elf/arm/__init__.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/elf/arm/attributes.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/elf/defs.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/elf/model.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/emon52.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/etek.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/exceptions.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/__init__.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/ctre.hpp +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/difflib.h +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/elf_parser.cpp +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/elf_parser.hpp +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/exceptions.cpp +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/exceptions.hpp +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/extensions/hexfile.cpp +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/fpc.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/hexdump.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/hexfile.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/ieee695.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/ihex.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/image.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/logger.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/mostec.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/objutils.code-workspace +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/oocdtxt.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/pecoff/__init__.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/pecoff/defs.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/pecoff/model.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/pecoff/pdb/__init__.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/pickleif.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/rca.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/readers.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/registry.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/arduino_build_artifacts.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_cgen.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_coff_extract.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_coff_import.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_coff_info.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_coff_syms.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_dwarf_import.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_dwarf_info.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_elf_import.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_hex_info.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_hex_merge.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/scripts/oj_hex_split.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/section.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/shf.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/sig.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/srec.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/symbols.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tek.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/__init__.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_arm_attributes.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_asam_alternate_modes.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_ash.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_c_generator.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_checksums.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_cygpath.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_diff_bin.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_elf.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_emon52.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_etek.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_examples_cgen.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_extended.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_fpc.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_hexdump.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_hexfile.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_ihex.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_image.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_mostec.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_oocdtxt.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_pdb_typeinfo_dump.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_probe_uniqueness.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_readers.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_registry.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_repr.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_section.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_section_join.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_shf.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_sm.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_srec.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_tek.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/tests/test_titext.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/titxt.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/utils/arduino.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/objutils/utils/diff.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/requirements.txt +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/setup.cfg +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/setup.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/test_join_sections.py +0 -0
- {objutils-0.10.19 → objutils-0.10.20}/test_requirements.txt +0 -0
|
@@ -35,21 +35,21 @@ repos:
|
|
|
35
35
|
- id: trailing-whitespace
|
|
36
36
|
|
|
37
37
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
38
|
-
rev: 26.
|
|
38
|
+
rev: 26.10.1
|
|
39
39
|
hooks:
|
|
40
40
|
- id: black
|
|
41
41
|
language_version: python3.13
|
|
42
42
|
args: ["--line-length=132"]
|
|
43
43
|
|
|
44
44
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
45
|
-
rev: v0.
|
|
45
|
+
rev: v0.17.0
|
|
46
46
|
hooks:
|
|
47
47
|
- id: ruff
|
|
48
48
|
args: ["--fix", "--exit-non-zero-on-fix"]
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
- repo: https://github.com/asottile/pyupgrade
|
|
52
|
-
rev: v3.
|
|
52
|
+
rev: v3.22.0
|
|
53
53
|
hooks:
|
|
54
54
|
- id: pyupgrade
|
|
55
55
|
args: ["--py39-plus"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: objutils
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.20
|
|
4
4
|
Summary: Objectfile library for Python
|
|
5
5
|
Keywords: hex files,intel hex,s19,srec,srecords,object files,map files,embedded,microcontroller,ECU,shf,rfc4194
|
|
6
6
|
Author-Email: Christoph Schueler <cpu12.gems@googlemail.com>
|
|
@@ -24,6 +24,7 @@ Requires-Dist: sqlalchemy>=2.0.29
|
|
|
24
24
|
Requires-Dist: rich>=14.2
|
|
25
25
|
Requires-Dist: numpy>=2.2.5
|
|
26
26
|
Requires-Dist: ufilename<0.2.0,>=0.1.1
|
|
27
|
+
Requires-Dist: coverage<8.0.0,>=7.16.2
|
|
27
28
|
Provides-Extra: dev
|
|
28
29
|
Requires-Dist: bumpver>=2023.1129; extra == "dev"
|
|
29
30
|
Requires-Dist: pre-commit>=3.7.0; extra == "dev"
|
|
@@ -186,7 +186,7 @@ import io
|
|
|
186
186
|
import json
|
|
187
187
|
from collections import OrderedDict
|
|
188
188
|
from dataclasses import dataclass, field
|
|
189
|
-
from typing import Any
|
|
189
|
+
from typing import Any
|
|
190
190
|
|
|
191
191
|
from construct import (
|
|
192
192
|
Array,
|
|
@@ -198,8 +198,6 @@ from construct import (
|
|
|
198
198
|
If,
|
|
199
199
|
IfThenElse,
|
|
200
200
|
Int8ul,
|
|
201
|
-
Int32ub,
|
|
202
|
-
Int32ul,
|
|
203
201
|
Padding,
|
|
204
202
|
Pass,
|
|
205
203
|
Struct,
|
|
@@ -433,6 +431,10 @@ class Abbrevations:
|
|
|
433
431
|
"stop" / Tell,
|
|
434
432
|
)
|
|
435
433
|
|
|
434
|
+
@staticmethod
|
|
435
|
+
def _tag_name_fallback(tag: int) -> str:
|
|
436
|
+
return f"User TAG value: 0x{tag:04x}"
|
|
437
|
+
|
|
436
438
|
def __init__(self, section):
|
|
437
439
|
"""Initialize abbreviation parser.
|
|
438
440
|
|
|
@@ -442,6 +444,67 @@ class Abbrevations:
|
|
|
442
444
|
self.image = section.image
|
|
443
445
|
self.length = len(section.image)
|
|
444
446
|
self.abbrevations = {}
|
|
447
|
+
self._parsed_offsets: set[int] = set()
|
|
448
|
+
self._tag_name_cache: dict[int, str] = {}
|
|
449
|
+
self._encoding_cache: dict[int, Any] = {}
|
|
450
|
+
self._form_cache: dict[int, Any] = {}
|
|
451
|
+
|
|
452
|
+
def _tag_name(self, tag: int) -> str:
|
|
453
|
+
cached = self._tag_name_cache.get(tag)
|
|
454
|
+
if cached is not None:
|
|
455
|
+
return cached
|
|
456
|
+
try:
|
|
457
|
+
value = constants.Tag(tag).name
|
|
458
|
+
except (AttributeError, TypeError, ValueError):
|
|
459
|
+
value = self._tag_name_fallback(tag)
|
|
460
|
+
self._tag_name_cache[tag] = value
|
|
461
|
+
return value
|
|
462
|
+
|
|
463
|
+
def _encoding(self, attr_value: int):
|
|
464
|
+
cached = self._encoding_cache.get(attr_value)
|
|
465
|
+
if cached is not None:
|
|
466
|
+
return cached
|
|
467
|
+
try:
|
|
468
|
+
value = constants.AttributeEncoding(attr_value)
|
|
469
|
+
except (TypeError, ValueError):
|
|
470
|
+
value = constants.FakeEncoding(attr_value)
|
|
471
|
+
self._encoding_cache[attr_value] = value
|
|
472
|
+
return value
|
|
473
|
+
|
|
474
|
+
def _form(self, form_value: int):
|
|
475
|
+
cached = self._form_cache.get(form_value)
|
|
476
|
+
if cached is not None:
|
|
477
|
+
return cached
|
|
478
|
+
value = constants.AttributeForm(form_value)
|
|
479
|
+
self._form_cache[form_value] = value
|
|
480
|
+
return value
|
|
481
|
+
|
|
482
|
+
def _build_abbrev(self, tag: int, children: bool, attrs: list[Any]) -> Abbrevation:
|
|
483
|
+
abbrev = Abbrevation(self._tag_name(tag), bool(children), [])
|
|
484
|
+
append_attr = abbrev.attrs.append
|
|
485
|
+
implicit_const = constants.AttributeForm.DW_FORM_implicit_const
|
|
486
|
+
for attr_value, form_value, special_value in attrs:
|
|
487
|
+
encoding = self._encoding(attr_value)
|
|
488
|
+
form = self._form(form_value)
|
|
489
|
+
if form == implicit_const:
|
|
490
|
+
append_attr(Attribute(encoding, form, special_value))
|
|
491
|
+
else:
|
|
492
|
+
append_attr(Attribute(encoding, form))
|
|
493
|
+
return abbrev
|
|
494
|
+
|
|
495
|
+
def _read_uleb(self, image: bytes, offset: int) -> tuple[int, int]:
|
|
496
|
+
"""Decode one ULEB128 value from image[offset:] and return (value, new_offset)."""
|
|
497
|
+
result = 0
|
|
498
|
+
shift = 0
|
|
499
|
+
length = self.length
|
|
500
|
+
while offset < length:
|
|
501
|
+
bval = image[offset]
|
|
502
|
+
offset += 1
|
|
503
|
+
result |= (bval & 0x7F) << shift
|
|
504
|
+
if (bval & 0x80) == 0:
|
|
505
|
+
return result, offset
|
|
506
|
+
shift += 7
|
|
507
|
+
raise ValueError("Truncated ULEB128 in .debug_abbrev section.")
|
|
445
508
|
|
|
446
509
|
def get(self, abbr_offset, item):
|
|
447
510
|
"""Retrieve abbreviation schema by code.
|
|
@@ -455,96 +518,53 @@ class Abbrevations:
|
|
|
455
518
|
"""
|
|
456
519
|
if item == 0:
|
|
457
520
|
return None
|
|
458
|
-
if
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
abbr_offset,
|
|
462
|
-
item,
|
|
463
|
-
)
|
|
464
|
-
)
|
|
465
|
-
else:
|
|
466
|
-
return self._fetch(abbr_offset, item)
|
|
521
|
+
if abbr_offset not in self._parsed_offsets:
|
|
522
|
+
self._fetch(abbr_offset)
|
|
523
|
+
return self.abbrevations.get((abbr_offset, item))
|
|
467
524
|
|
|
468
|
-
def _fetch(self, abbr_offset
|
|
525
|
+
def _fetch(self, abbr_offset):
|
|
469
526
|
"""Parse abbreviation from raw bytes and cache it.
|
|
470
527
|
|
|
471
|
-
Parses abbreviation table starting at abbr_offset
|
|
472
|
-
|
|
528
|
+
Parses a complete abbreviation table starting at abbr_offset and
|
|
529
|
+
caches all entries for O(1) subsequent lookups.
|
|
473
530
|
|
|
474
531
|
Args:
|
|
475
532
|
abbr_offset: Start offset in abbreviation section
|
|
476
|
-
item: Target abbreviation code
|
|
477
|
-
|
|
478
|
-
Returns:
|
|
479
|
-
Abbrevation instance for the requested code
|
|
480
533
|
"""
|
|
534
|
+
if abbr_offset in self._parsed_offsets:
|
|
535
|
+
return
|
|
536
|
+
|
|
537
|
+
image = self.image
|
|
481
538
|
offset = abbr_offset
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
)
|
|
493
|
-
if offset >= self.length:
|
|
494
|
-
break
|
|
495
|
-
abbrv_body = self.AbbrevationBody.parse(self.image[offset:])
|
|
496
|
-
tag = abbrv_body.tag
|
|
497
|
-
children = abbrv_body.children
|
|
498
|
-
offset += abbrv_body.stop - abbrv_body.start
|
|
539
|
+
try:
|
|
540
|
+
while offset < self.length:
|
|
541
|
+
code, offset = self._read_uleb(image, offset)
|
|
542
|
+
if code == 0:
|
|
543
|
+
break
|
|
544
|
+
tag, offset = self._read_uleb(image, offset)
|
|
545
|
+
if offset >= self.length:
|
|
546
|
+
break
|
|
547
|
+
children = image[offset]
|
|
548
|
+
offset += 1
|
|
499
549
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
)
|
|
550
|
+
attrs: list[tuple[int, int, Any]] = []
|
|
551
|
+
while True:
|
|
552
|
+
attr_value, offset = self._read_uleb(image, offset)
|
|
553
|
+
form_value, offset = self._read_uleb(image, offset)
|
|
554
|
+
if attr_value == 0 or form_value == 0:
|
|
555
|
+
break
|
|
556
|
+
if form_value == constants.AttributeForm.DW_FORM_implicit_const:
|
|
557
|
+
special_value, offset = self._read_uleb(image, offset)
|
|
558
|
+
attrs.append((attr_value, form_value, special_value))
|
|
559
|
+
else:
|
|
560
|
+
attrs.append((attr_value, form_value, None))
|
|
512
561
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
offset += attr.stop - attr.start
|
|
520
|
-
special_value = self.SpecialValueStruct.parse(self.image[offset:])
|
|
521
|
-
offset += special_value.stop - special_value.start
|
|
522
|
-
self.abbrevations[key].attrs.append(
|
|
523
|
-
Attribute(
|
|
524
|
-
constants.AttributeEncoding(attr.attrValue),
|
|
525
|
-
constants.AttributeForm(attr.formValue),
|
|
526
|
-
special_value.value,
|
|
527
|
-
)
|
|
528
|
-
)
|
|
529
|
-
continue
|
|
530
|
-
if attr.attrValue != 0 and attr.formValue != 0:
|
|
531
|
-
try:
|
|
532
|
-
self.abbrevations[key].attrs.append(
|
|
533
|
-
Attribute(
|
|
534
|
-
constants.AttributeEncoding(attr.attrValue),
|
|
535
|
-
constants.AttributeForm(attr.formValue),
|
|
536
|
-
)
|
|
537
|
-
)
|
|
538
|
-
except TypeError:
|
|
539
|
-
self.abbrevations[key].attrs.append(
|
|
540
|
-
Attribute(
|
|
541
|
-
constants.FakeEncoding(attr.attrValue),
|
|
542
|
-
constants.AttributeForm(attr.formValue),
|
|
543
|
-
)
|
|
544
|
-
)
|
|
545
|
-
offset += attr.stop - attr.start
|
|
546
|
-
if code == item:
|
|
547
|
-
return self.abbrevations[key]
|
|
562
|
+
self.abbrevations[(abbr_offset, code)] = self._build_abbrev(tag, (children == 1), attrs)
|
|
563
|
+
except ValueError:
|
|
564
|
+
# Graceful fallback: keep already cached entries and mark offset parsed.
|
|
565
|
+
pass
|
|
566
|
+
|
|
567
|
+
self._parsed_offsets.add(abbr_offset)
|
|
548
568
|
|
|
549
569
|
|
|
550
570
|
class DwarfProcessor:
|
|
@@ -619,9 +639,6 @@ class DwarfProcessor:
|
|
|
619
639
|
Earlier or later DWARF versions may not parse correctly.
|
|
620
640
|
"""
|
|
621
641
|
|
|
622
|
-
DATATYPES32 = {
|
|
623
|
-
"Addr": (Int32ul, Int32ub), # 4 - Unsigned program address
|
|
624
|
-
}
|
|
625
642
|
|
|
626
643
|
UTF8String = CString(encoding="utf8")
|
|
627
644
|
|
|
@@ -672,6 +689,7 @@ class DwarfProcessor:
|
|
|
672
689
|
strings=self.strings,
|
|
673
690
|
line_strings=self.line_strings,
|
|
674
691
|
)
|
|
692
|
+
self.elf_address_size = address_size
|
|
675
693
|
self.readers = factory.readers
|
|
676
694
|
self.stack_machine = factory.stack_machine
|
|
677
695
|
|
|
@@ -1030,135 +1048,180 @@ class DwarfProcessor:
|
|
|
1030
1048
|
"stop" / Tell,
|
|
1031
1049
|
"size" / Computed(this.stop - this.start),
|
|
1032
1050
|
)
|
|
1051
|
+
from contextlib import nullcontext
|
|
1052
|
+
|
|
1053
|
+
from sqlalchemy import func
|
|
1054
|
+
|
|
1033
1055
|
offset = 0
|
|
1034
1056
|
result = []
|
|
1035
1057
|
die_map = {}
|
|
1036
1058
|
idx = 0
|
|
1059
|
+
pending_die_rows: list[dict[str, Any]] = []
|
|
1060
|
+
pending_attr_rows: list[dict[str, Any]] = []
|
|
1037
1061
|
session = self.db_session
|
|
1038
1062
|
try:
|
|
1039
1063
|
no_autoflush = session.no_autoflush
|
|
1040
1064
|
except AttributeError:
|
|
1041
|
-
from contextlib import nullcontext
|
|
1042
|
-
|
|
1043
1065
|
no_autoflush = nullcontext()
|
|
1044
1066
|
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1067
|
+
max_rid = session.query(func.max(model.DebugInformationEntry.rid)).scalar() or 0
|
|
1068
|
+
next_die_rid = int(max_rid) + 1
|
|
1069
|
+
|
|
1070
|
+
# Chunk sizes tuned for SQLite bulk inserts to avoid oversized execute payloads.
|
|
1071
|
+
DIE_BATCH_SIZE = 10000
|
|
1072
|
+
ATTR_BATCH_SIZE = 20000
|
|
1073
|
+
|
|
1074
|
+
def _iter_chunks(rows: list[dict[str, Any]], size: int):
|
|
1075
|
+
for start_idx in range(0, len(rows), size):
|
|
1076
|
+
yield rows[start_idx : start_idx + size]
|
|
1077
|
+
|
|
1078
|
+
def _coerce_tag_value(tag: Any) -> Any:
|
|
1079
|
+
try:
|
|
1080
|
+
return int(constants.Tag[str(tag)])
|
|
1081
|
+
except (KeyError, TypeError, ValueError):
|
|
1082
|
+
try:
|
|
1083
|
+
return int(tag)
|
|
1084
|
+
except (TypeError, ValueError):
|
|
1085
|
+
return tag
|
|
1086
|
+
|
|
1087
|
+
SQLITE_INT64_MIN = -(2**63)
|
|
1088
|
+
SQLITE_INT64_MAX = 2**63 - 1
|
|
1089
|
+
|
|
1090
|
+
def _normalize_raw_value(value: Any) -> Any:
|
|
1091
|
+
"""Keep DB writes SQLite-safe while preserving semantics for consumers."""
|
|
1092
|
+
if value is None:
|
|
1093
|
+
return None
|
|
1094
|
+
if isinstance(value, int) and not (SQLITE_INT64_MIN <= value <= SQLITE_INT64_MAX):
|
|
1095
|
+
return str(value)
|
|
1096
|
+
return value
|
|
1097
|
+
|
|
1098
|
+
try:
|
|
1099
|
+
with no_autoflush:
|
|
1076
1100
|
while True:
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
if start >= dbgInfo.start + cu_length + 4:
|
|
1101
|
+
section_pos = image.tell()
|
|
1102
|
+
if section_pos >= section_length - 1:
|
|
1080
1103
|
break
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
die_stack.pop()
|
|
1092
|
-
# Pop DB parent stack so subsequent siblings attach to the correct parent
|
|
1093
|
-
if db_die_stack:
|
|
1094
|
-
db_die_stack.pop()
|
|
1104
|
+
root_element = DebugInformationEntry("root")
|
|
1105
|
+
die_stack = [root_element]
|
|
1106
|
+
db_parent_stack: list[int] = []
|
|
1107
|
+
|
|
1108
|
+
dbgInfo = DbgInfo.parse_stream(image) # CU
|
|
1109
|
+
cu_length = dbgInfo.header.unit_length
|
|
1110
|
+
version = dbgInfo.header.version
|
|
1111
|
+
if version < 5:
|
|
1112
|
+
debug_abbrev_offset = dbgInfo.body.debug_abbrev_offset
|
|
1113
|
+
address_size = dbgInfo.body.address_size
|
|
1095
1114
|
else:
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
start = image.tell()
|
|
1117
|
-
if reader is None:
|
|
1118
|
-
if form == constants.AttributeForm.DW_FORM_implicit_const:
|
|
1119
|
-
value = special_value
|
|
1120
|
-
# In-memory representation (keep minimal to preserve structure)
|
|
1121
|
-
die.attributes.append((enc.name, DIEAttribute(value, value)))
|
|
1122
|
-
pending_attrs.append((db_die, enc, form, value))
|
|
1123
|
-
offset += attr.stop - attr.start
|
|
1124
|
-
pos = image.tell()
|
|
1125
|
-
if pos >= dbgInfo.start + cu_length + 4:
|
|
1126
|
-
break
|
|
1127
|
-
continue
|
|
1128
|
-
else:
|
|
1129
|
-
# Unknown reader; skip gracefully
|
|
1130
|
-
continue
|
|
1131
|
-
value = reader.parse_stream(image)
|
|
1132
|
-
# In-memory representation: do not compute heavy display, keep simple
|
|
1133
|
-
die.attributes.append((enc.name, DIEAttribute(value, value)))
|
|
1134
|
-
# DB attribute: store for lazy display
|
|
1135
|
-
pending_attrs.append((db_die, enc, form, value))
|
|
1136
|
-
offset += attr.stop - attr.start
|
|
1137
|
-
pos = image.tell()
|
|
1138
|
-
if pos >= dbgInfo.start + cu_length + 4:
|
|
1115
|
+
if version > 5: # Handle messed up version numbers in some binaries (e.g. 39424)
|
|
1116
|
+
address_size = self.elf_address_size
|
|
1117
|
+
else:
|
|
1118
|
+
address_size = dbgInfo.body.address_size
|
|
1119
|
+
debug_abbrev_offset = dbgInfo.body.debug_abbrev_offset
|
|
1120
|
+
idx += 1
|
|
1121
|
+
if self.verbose:
|
|
1122
|
+
print(
|
|
1123
|
+
f" Compilation Unit #{idx:05d} offset: 0x{dbgInfo.start:08x} length: 0x{cu_length:08x} abbrev-offset: 0x{debug_abbrev_offset:08x}"
|
|
1124
|
+
)
|
|
1125
|
+
level = 0
|
|
1126
|
+
pos = 0
|
|
1127
|
+
offset += dbgInfo.stop - dbgInfo.start
|
|
1128
|
+
form_readers = self.get_form_readers(address_size)
|
|
1129
|
+
if pos >= cu_length:
|
|
1130
|
+
break
|
|
1131
|
+
while True:
|
|
1132
|
+
die_start = None
|
|
1133
|
+
start = image.tell()
|
|
1134
|
+
if start >= dbgInfo.start + cu_length + 4:
|
|
1139
1135
|
break
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1136
|
+
if start >= section_length - 1:
|
|
1137
|
+
break
|
|
1138
|
+
attr = Attribute.parse_stream(image)
|
|
1139
|
+
abbr = self.abbrevations.get(debug_abbrev_offset, attr.attr)
|
|
1140
|
+
if not abbr:
|
|
1141
|
+
if level > 0:
|
|
1142
|
+
level -= 1
|
|
1143
|
+
if len(die_stack) > 1:
|
|
1144
|
+
die_stack.pop()
|
|
1145
|
+
if db_parent_stack:
|
|
1146
|
+
db_parent_stack.pop()
|
|
1147
|
+
else:
|
|
1148
|
+
die = DebugInformationEntry(abbr.tag)
|
|
1149
|
+
die_rid = next_die_rid
|
|
1150
|
+
next_die_rid += 1
|
|
1151
|
+
parent_rid = db_parent_stack[-1] if db_parent_stack else None
|
|
1152
|
+
|
|
1153
|
+
pending_die_rows.append(
|
|
1150
1154
|
{
|
|
1151
|
-
"
|
|
1152
|
-
"
|
|
1153
|
-
"
|
|
1154
|
-
"
|
|
1155
|
+
"rid": die_rid,
|
|
1156
|
+
"tag": _coerce_tag_value(abbr.tag),
|
|
1157
|
+
"offset": start,
|
|
1158
|
+
"cu_start": dbgInfo.start,
|
|
1159
|
+
"parent_id": parent_rid,
|
|
1155
1160
|
}
|
|
1156
1161
|
)
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
+
|
|
1163
|
+
if attr.attr != 0:
|
|
1164
|
+
die_stack[-1].children.append(die)
|
|
1165
|
+
die_start = start
|
|
1166
|
+
if abbr.children:
|
|
1167
|
+
die_stack.append(die)
|
|
1168
|
+
db_parent_stack.append(die_rid)
|
|
1169
|
+
level += 1
|
|
1170
|
+
for enc, form, special_value in abbr.attrs:
|
|
1171
|
+
reader = form_readers.get(form)
|
|
1172
|
+
start = image.tell()
|
|
1173
|
+
if reader is None:
|
|
1174
|
+
if form == constants.AttributeForm.DW_FORM_implicit_const:
|
|
1175
|
+
value = special_value
|
|
1176
|
+
normalized_value = _normalize_raw_value(value)
|
|
1177
|
+
die.attributes.append((enc.name, DIEAttribute(normalized_value, normalized_value)))
|
|
1178
|
+
pending_attr_rows.append(
|
|
1179
|
+
{
|
|
1180
|
+
"name": int(enc),
|
|
1181
|
+
"form": int(form),
|
|
1182
|
+
"raw_value": normalized_value,
|
|
1183
|
+
"entry_id": die_rid,
|
|
1184
|
+
}
|
|
1185
|
+
)
|
|
1186
|
+
offset += attr.stop - attr.start
|
|
1187
|
+
pos = image.tell()
|
|
1188
|
+
if pos >= dbgInfo.start + cu_length + 4:
|
|
1189
|
+
break
|
|
1190
|
+
continue
|
|
1191
|
+
else:
|
|
1192
|
+
continue
|
|
1193
|
+
value = reader.parse_stream(image)
|
|
1194
|
+
normalized_value = _normalize_raw_value(value)
|
|
1195
|
+
die.attributes.append((enc.name, DIEAttribute(normalized_value, normalized_value)))
|
|
1196
|
+
pending_attr_rows.append(
|
|
1197
|
+
{
|
|
1198
|
+
"name": int(enc),
|
|
1199
|
+
"form": int(form) if form is not None else None,
|
|
1200
|
+
"raw_value": normalized_value,
|
|
1201
|
+
"entry_id": die_rid,
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
offset += attr.stop - attr.start
|
|
1205
|
+
pos = image.tell()
|
|
1206
|
+
if pos >= dbgInfo.start + cu_length + 4:
|
|
1207
|
+
break
|
|
1208
|
+
if die_start is not None:
|
|
1209
|
+
die_map[die_start] = die
|
|
1210
|
+
|
|
1211
|
+
result.append(root_element)
|
|
1212
|
+
|
|
1213
|
+
if pending_die_rows:
|
|
1214
|
+
die_insert = model.DebugInformationEntry.__table__.insert()
|
|
1215
|
+
for chunk in _iter_chunks(pending_die_rows, DIE_BATCH_SIZE):
|
|
1216
|
+
session.execute(die_insert, chunk)
|
|
1217
|
+
if pending_attr_rows:
|
|
1218
|
+
attr_insert = model.DIEAttribute.__table__.insert()
|
|
1219
|
+
for chunk in _iter_chunks(pending_attr_rows, ATTR_BATCH_SIZE):
|
|
1220
|
+
session.execute(attr_insert, chunk)
|
|
1221
|
+
session.commit()
|
|
1222
|
+
except Exception:
|
|
1223
|
+
session.rollback()
|
|
1224
|
+
raise
|
|
1162
1225
|
return DebugInformation(die_map, [d.children[0] for d in result])
|
|
1163
1226
|
|
|
1164
1227
|
def pubnames(self):
|