objutils 0.10.17__tar.gz → 0.10.19__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.
Files changed (280) hide show
  1. objutils-0.10.19/.idea/objutils@1.iml +11 -0
  2. {objutils-0.10.17 → objutils-0.10.19}/.pre-commit-config.yaml +1 -1
  3. {objutils-0.10.17 → objutils-0.10.19}/PKG-INFO +1 -1
  4. {objutils-0.10.17 → objutils-0.10.19}/docs/tutorial.rst +44 -0
  5. {objutils-0.10.17 → objutils-0.10.19}/objutils/__init__.py +1 -1
  6. {objutils-0.10.17 → objutils-0.10.19}/objutils/elf/__init__.py +8 -8
  7. {objutils-0.10.17 → objutils-0.10.19}/objutils/image.py +7 -0
  8. {objutils-0.10.17 → objutils-0.10.19}/objutils/pecoff/__init__.py +52 -15
  9. {objutils-0.10.17 → objutils-0.10.19}/objutils/pecoff/defs.py +27 -0
  10. {objutils-0.10.17 → objutils-0.10.19}/objutils/pecoff/pdb/__init__.py +1 -1
  11. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_coff_import.py +2 -1
  12. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_coff_info.py +23 -9
  13. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_coff_syms.py +23 -17
  14. {objutils-0.10.17 → objutils-0.10.19}/objutils/section.py +37 -5
  15. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_asam_alternate_modes.py +247 -2
  16. {objutils-0.10.17 → objutils-0.10.19}/objutils/version.py +1 -1
  17. {objutils-0.10.17 → objutils-0.10.19}/pyproject.toml +2 -2
  18. {objutils-0.10.17 → objutils-0.10.19}/.clang-format +0 -0
  19. {objutils-0.10.17 → objutils-0.10.19}/.codacy.yml +0 -0
  20. {objutils-0.10.17 → objutils-0.10.19}/.codeclimate.yml +0 -0
  21. {objutils-0.10.17 → objutils-0.10.19}/.coveralls.yml +0 -0
  22. {objutils-0.10.17 → objutils-0.10.19}/.github/FUNDING.yml +0 -0
  23. {objutils-0.10.17 → objutils-0.10.19}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  24. {objutils-0.10.17 → objutils-0.10.19}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  25. {objutils-0.10.17 → objutils-0.10.19}/.github/ISSUE_TEMPLATE/documentation.yml +0 -0
  26. {objutils-0.10.17 → objutils-0.10.19}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  27. {objutils-0.10.17 → objutils-0.10.19}/.github/ISSUE_TEMPLATE.md +0 -0
  28. {objutils-0.10.17 → objutils-0.10.19}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  29. {objutils-0.10.17 → objutils-0.10.19}/.github/copilot-instructions.md +0 -0
  30. {objutils-0.10.17 → objutils-0.10.19}/.github/workflows/pythonapp.yml +0 -0
  31. {objutils-0.10.17 → objutils-0.10.19}/.gitignore +0 -0
  32. {objutils-0.10.17 → objutils-0.10.19}/.idea/.gitignore +0 -0
  33. {objutils-0.10.17 → objutils-0.10.19}/.idea/copilot.data.migration.ask2agent.xml +0 -0
  34. {objutils-0.10.17 → objutils-0.10.19}/.idea/deployment.xml +0 -0
  35. {objutils-0.10.17 → objutils-0.10.19}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  36. {objutils-0.10.17 → objutils-0.10.19}/.idea/misc.xml +0 -0
  37. {objutils-0.10.17 → objutils-0.10.19}/.idea/modules.xml +0 -0
  38. {objutils-0.10.17 → objutils-0.10.19}/.idea/pyLspTools.xml +0 -0
  39. {objutils-0.10.17 → objutils-0.10.19}/.idea/pyProjectModel.xml +0 -0
  40. {objutils-0.10.17 → objutils-0.10.19}/.idea/vcs.xml +0 -0
  41. {objutils-0.10.17 → objutils-0.10.19}/.pylintrc +0 -0
  42. {objutils-0.10.17 → objutils-0.10.19}/.readthedocs.yml +0 -0
  43. {objutils-0.10.17 → objutils-0.10.19}/.travis.yml +0 -0
  44. {objutils-0.10.17 → objutils-0.10.19}/CMakeLists.txt +0 -0
  45. {objutils-0.10.17 → objutils-0.10.19}/CODE_OF_CONDUCT.md +0 -0
  46. {objutils-0.10.17 → objutils-0.10.19}/CONTRIBUTORS +0 -0
  47. {objutils-0.10.17 → objutils-0.10.19}/LICENSE +0 -0
  48. {objutils-0.10.17 → objutils-0.10.19}/MANIFEST.in +0 -0
  49. {objutils-0.10.17 → objutils-0.10.19}/PULL_REQUEST_TEMPLATE.md +0 -0
  50. {objutils-0.10.17 → objutils-0.10.19}/appveyor.yml +0 -0
  51. {objutils-0.10.17 → objutils-0.10.19}/bandit.yml +0 -0
  52. {objutils-0.10.17 → objutils-0.10.19}/docs/Data_Formats.pdf +0 -0
  53. {objutils-0.10.17 → objutils-0.10.19}/docs/ELF_Format.pdf +0 -0
  54. {objutils-0.10.17 → objutils-0.10.19}/docs/KNOWN_GOOD_DWARF_REFERENCE.md +0 -0
  55. {objutils-0.10.17 → objutils-0.10.19}/docs/README.rst +0 -0
  56. {objutils-0.10.17 → objutils-0.10.19}/docs/apidoc.sh +0 -0
  57. {objutils-0.10.17 → objutils-0.10.19}/docs/conf.py +0 -0
  58. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.buildinfo +0 -0
  59. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.buildinfo.bak +0 -0
  60. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/README.doctree +0 -0
  61. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/environment.pickle +0 -0
  62. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/howto.doctree +0 -0
  63. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/index.doctree +0 -0
  64. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/installation.doctree +0 -0
  65. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/modules.doctree +0 -0
  66. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/objutils.doctree +0 -0
  67. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/objutils.elf.doctree +0 -0
  68. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/scripts.doctree +0 -0
  69. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/session.doctree +0 -0
  70. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/.doctrees/tutorial.doctree +0 -0
  71. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/README.html +0 -0
  72. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_images/objutils_basic.png +0 -0
  73. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/index.html +0 -0
  74. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/ash.html +0 -0
  75. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/binfile.html +0 -0
  76. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/checksums.html +0 -0
  77. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/cosmac.html +0 -0
  78. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/elf/defs.html +0 -0
  79. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/elf.html +0 -0
  80. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/emon52.html +0 -0
  81. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/etek.html +0 -0
  82. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/exceptions.html +0 -0
  83. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/fpc.html +0 -0
  84. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/hexdump.html +0 -0
  85. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/hexfile.html +0 -0
  86. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/ihex.html +0 -0
  87. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/image.html +0 -0
  88. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/logger.html +0 -0
  89. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/mostec.html +0 -0
  90. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/pickleif.html +0 -0
  91. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/rca.html +0 -0
  92. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/readers.html +0 -0
  93. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/registry.html +0 -0
  94. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/section.html +0 -0
  95. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/sig.html +0 -0
  96. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/srec.html +0 -0
  97. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/tek.html +0 -0
  98. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/titxt.html +0 -0
  99. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils/utils.html +0 -0
  100. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_modules/objutils.html +0 -0
  101. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/README.rst.txt +0 -0
  102. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/howto.rst.txt +0 -0
  103. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/index.rst.txt +0 -0
  104. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/installation.rst.txt +0 -0
  105. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/modules.rst.txt +0 -0
  106. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/objutils.elf.rst.txt +0 -0
  107. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/objutils.rst.txt +0 -0
  108. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/scripts.rst.txt +0 -0
  109. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/session.rst.txt +0 -0
  110. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_sources/tutorial.rst.txt +0 -0
  111. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/alabaster.css +0 -0
  112. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/basic.css +0 -0
  113. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/check-solid.svg +0 -0
  114. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/clipboard.min.js +0 -0
  115. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/copy-button.svg +0 -0
  116. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/copybutton.css +0 -0
  117. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/copybutton.js +0 -0
  118. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/copybutton_funcs.js +0 -0
  119. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/custom.css +0 -0
  120. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/doctools.js +0 -0
  121. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/documentation_options.js +0 -0
  122. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/file.png +0 -0
  123. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/github-banner.svg +0 -0
  124. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/language_data.js +0 -0
  125. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/minus.png +0 -0
  126. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/plus.png +0 -0
  127. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/pygments.css +0 -0
  128. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/scripts/bootstrap.js +0 -0
  129. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
  130. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/scripts/fontawesome.js +0 -0
  131. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/scripts/fontawesome.js.LICENSE.txt +0 -0
  132. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/scripts/pydata-sphinx-theme.js +0 -0
  133. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/searchtools.js +0 -0
  134. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/sphinx_highlight.js +0 -0
  135. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/styles/pydata-sphinx-theme.css +0 -0
  136. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/styles/theme.css +0 -0
  137. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  138. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  139. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  140. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  141. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  142. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  143. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/_static/webpack-macros.html +0 -0
  144. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/genindex.html +0 -0
  145. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/howto.html +0 -0
  146. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/index.html +0 -0
  147. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/installation.html +0 -0
  148. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/modules.html +0 -0
  149. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/objects.inv +0 -0
  150. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/objutils.elf.html +0 -0
  151. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/objutils.html +0 -0
  152. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/py-modindex.html +0 -0
  153. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/scripts.html +0 -0
  154. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/search.html +0 -0
  155. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/searchindex.js +0 -0
  156. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/session.html +0 -0
  157. {objutils-0.10.17 → objutils-0.10.19}/docs/docs/_build/html/tutorial.html +0 -0
  158. {objutils-0.10.17 → objutils-0.10.19}/docs/elf-64-gen.pdf +0 -0
  159. {objutils-0.10.17 → objutils-0.10.19}/docs/example0.srec +0 -0
  160. {objutils-0.10.17 → objutils-0.10.19}/docs/howto.rst +0 -0
  161. {objutils-0.10.17 → objutils-0.10.19}/docs/index.rst +0 -0
  162. {objutils-0.10.17 → objutils-0.10.19}/docs/installation.rst +0 -0
  163. {objutils-0.10.17 → objutils-0.10.19}/docs/make.bat +0 -0
  164. {objutils-0.10.17 → objutils-0.10.19}/docs/modules.rst +0 -0
  165. {objutils-0.10.17 → objutils-0.10.19}/docs/objutils.elf.rst +0 -0
  166. {objutils-0.10.17 → objutils-0.10.19}/docs/objutils.rst +0 -0
  167. {objutils-0.10.17 → objutils-0.10.19}/docs/objutils_banner.png +0 -0
  168. {objutils-0.10.17 → objutils-0.10.19}/docs/objutils_basic.png +0 -0
  169. {objutils-0.10.17 → objutils-0.10.19}/docs/objutils_dark.jpg +0 -0
  170. {objutils-0.10.17 → objutils-0.10.19}/docs/objutils_social.jpg +0 -0
  171. {objutils-0.10.17 → objutils-0.10.19}/docs/requirements.txt +0 -0
  172. {objutils-0.10.17 → objutils-0.10.19}/docs/scripts.rst +0 -0
  173. {objutils-0.10.17 → objutils-0.10.19}/docs/session.rst +0 -0
  174. {objutils-0.10.17 → objutils-0.10.19}/docs/tutorial1.ipynb +0 -0
  175. {objutils-0.10.17 → objutils-0.10.19}/objutils/.coveragerc +0 -0
  176. {objutils-0.10.17 → objutils-0.10.19}/objutils/.vscode/launch.json +0 -0
  177. {objutils-0.10.17 → objutils-0.10.19}/objutils/.vscode/settings.json +0 -0
  178. {objutils-0.10.17 → objutils-0.10.19}/objutils/a2l_test.shf +0 -0
  179. {objutils-0.10.17 → objutils-0.10.19}/objutils/ash.py +0 -0
  180. {objutils-0.10.17 → objutils-0.10.19}/objutils/binfile.py +0 -0
  181. {objutils-0.10.17 → objutils-0.10.19}/objutils/checksums.py +0 -0
  182. {objutils-0.10.17 → objutils-0.10.19}/objutils/cosmac.py +0 -0
  183. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/__init__.py +0 -0
  184. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/attrparser.py +0 -0
  185. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/c_generator.py +0 -0
  186. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/constants.py +0 -0
  187. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/encoding.py +0 -0
  188. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/lineprog.py +0 -0
  189. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/readers.py +0 -0
  190. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/sm.py +0 -0
  191. {objutils-0.10.17 → objutils-0.10.19}/objutils/dwarf/traverser.py +0 -0
  192. {objutils-0.10.17 → objutils-0.10.19}/objutils/elf/arm/__init__.py +0 -0
  193. {objutils-0.10.17 → objutils-0.10.19}/objutils/elf/arm/attributes.py +0 -0
  194. {objutils-0.10.17 → objutils-0.10.19}/objutils/elf/defs.py +0 -0
  195. {objutils-0.10.17 → objutils-0.10.19}/objutils/elf/model.py +0 -0
  196. {objutils-0.10.17 → objutils-0.10.19}/objutils/emon52.py +0 -0
  197. {objutils-0.10.17 → objutils-0.10.19}/objutils/etek.py +0 -0
  198. {objutils-0.10.17 → objutils-0.10.19}/objutils/exceptions.py +0 -0
  199. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/__init__.py +0 -0
  200. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/ctre.hpp +0 -0
  201. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/difflib.h +0 -0
  202. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/elf_parser.cpp +0 -0
  203. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/elf_parser.hpp +0 -0
  204. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/exceptions.cpp +0 -0
  205. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/exceptions.hpp +0 -0
  206. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/hexfile.cpp +0 -0
  207. {objutils-0.10.17 → objutils-0.10.19}/objutils/extensions/wrapper.cpp +0 -0
  208. {objutils-0.10.17 → objutils-0.10.19}/objutils/fpc.py +0 -0
  209. {objutils-0.10.17 → objutils-0.10.19}/objutils/hexdump.py +0 -0
  210. {objutils-0.10.17 → objutils-0.10.19}/objutils/hexfile.py +0 -0
  211. {objutils-0.10.17 → objutils-0.10.19}/objutils/ieee695.py +0 -0
  212. {objutils-0.10.17 → objutils-0.10.19}/objutils/ihex.py +0 -0
  213. {objutils-0.10.17 → objutils-0.10.19}/objutils/logger.py +0 -0
  214. {objutils-0.10.17 → objutils-0.10.19}/objutils/mostec.py +0 -0
  215. {objutils-0.10.17 → objutils-0.10.19}/objutils/objutils.code-workspace +0 -0
  216. {objutils-0.10.17 → objutils-0.10.19}/objutils/oocdtxt.py +0 -0
  217. {objutils-0.10.17 → objutils-0.10.19}/objutils/pecoff/model.py +0 -0
  218. {objutils-0.10.17 → objutils-0.10.19}/objutils/pickleif.py +0 -0
  219. {objutils-0.10.17 → objutils-0.10.19}/objutils/rca.py +0 -0
  220. {objutils-0.10.17 → objutils-0.10.19}/objutils/readers.py +0 -0
  221. {objutils-0.10.17 → objutils-0.10.19}/objutils/registry.py +0 -0
  222. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/arduino_build_artifacts.py +0 -0
  223. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_cgen.py +0 -0
  224. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_coff_extract.py +0 -0
  225. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_dwarf_import.py +0 -0
  226. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_dwarf_info.py +0 -0
  227. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_elf_arm_attrs.py +0 -0
  228. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_elf_extract.py +0 -0
  229. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_elf_import.py +0 -0
  230. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_elf_info.py +0 -0
  231. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_elf_syms.py +0 -0
  232. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_hex_info.py +0 -0
  233. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_hex_merge.py +0 -0
  234. {objutils-0.10.17 → objutils-0.10.19}/objutils/scripts/oj_hex_split.py +0 -0
  235. {objutils-0.10.17 → objutils-0.10.19}/objutils/shf.py +0 -0
  236. {objutils-0.10.17 → objutils-0.10.19}/objutils/sig.py +0 -0
  237. {objutils-0.10.17 → objutils-0.10.19}/objutils/srec.py +0 -0
  238. {objutils-0.10.17 → objutils-0.10.19}/objutils/symbols.py +0 -0
  239. {objutils-0.10.17 → objutils-0.10.19}/objutils/tek.py +0 -0
  240. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/__init__.py +0 -0
  241. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_arm_attributes.py +0 -0
  242. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_ash.py +0 -0
  243. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_c_generator.py +0 -0
  244. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_checksums.py +0 -0
  245. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_cygpath.py +0 -0
  246. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_diff_bin.py +0 -0
  247. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_elf.py +0 -0
  248. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_emon52.py +0 -0
  249. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_etek.py +0 -0
  250. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_examples_cgen.py +0 -0
  251. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_extended.py +0 -0
  252. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_fpc.py +0 -0
  253. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_hexdump.py +0 -0
  254. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_hexfile.py +0 -0
  255. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_ihex.py +0 -0
  256. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_image.py +0 -0
  257. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_mostec.py +0 -0
  258. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_oocdtxt.py +0 -0
  259. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_pdb_typeinfo_dump.py +0 -0
  260. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_probe_uniqueness.py +0 -0
  261. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_readers.py +0 -0
  262. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_registry.py +0 -0
  263. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_repr.py +0 -0
  264. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_section.py +0 -0
  265. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_section_join.py +0 -0
  266. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_shf.py +0 -0
  267. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_sm.py +0 -0
  268. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_srec.py +0 -0
  269. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_tek.py +0 -0
  270. {objutils-0.10.17 → objutils-0.10.19}/objutils/tests/test_titext.py +0 -0
  271. {objutils-0.10.17 → objutils-0.10.19}/objutils/titxt.py +0 -0
  272. {objutils-0.10.17 → objutils-0.10.19}/objutils/utils/__init__.py +0 -0
  273. {objutils-0.10.17 → objutils-0.10.19}/objutils/utils/arduino.py +0 -0
  274. {objutils-0.10.17 → objutils-0.10.19}/objutils/utils/diff.py +0 -0
  275. {objutils-0.10.17 → objutils-0.10.19}/poetry.lock +0 -0
  276. {objutils-0.10.17 → objutils-0.10.19}/requirements.txt +0 -0
  277. {objutils-0.10.17 → objutils-0.10.19}/setup.cfg +0 -0
  278. {objutils-0.10.17 → objutils-0.10.19}/setup.py +0 -0
  279. {objutils-0.10.17 → objutils-0.10.19}/test_join_sections.py +0 -0
  280. {objutils-0.10.17 → objutils-0.10.19}/test_requirements.txt +0 -0
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module external.system.id="pyproject.toml" type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ <excludeFolder url="file://$MODULE_DIR$/objutils/.venv" />
7
+ </content>
8
+ <orderEntry type="jdk" jdkName="Poetry (objutils) (2)" jdkType="Python SDK" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ </component>
11
+ </module>
@@ -42,7 +42,7 @@ repos:
42
42
  args: ["--line-length=132"]
43
43
 
44
44
  - repo: https://github.com/astral-sh/ruff-pre-commit
45
- rev: v0.16.1
45
+ rev: v0.16.6
46
46
  hooks:
47
47
  - id: ruff
48
48
  args: ["--fix", "--exit-non-zero-on-fix"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: objutils
3
- Version: 0.10.17
3
+ Version: 0.10.19
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>
@@ -256,6 +256,13 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
256
256
  | ``ALTERNATE_WITH_Y`` | 2-D maps only: each Y-row preceded by its Y-axis |
257
257
  | | coordinate value in memory |
258
258
  +------------------------+---------------------------------------------------+
259
+ | ``ALTERNATE_CURVES`` | 1-D curves sharing a common axis, stored as |
260
+ | | Array-of-Structs (AoS). Shape must be |
261
+ | | ``(num_curves, num_axis_points)`` in ASAM |
262
+ | | convention. Equivalent to C-order ROW_DIR of |
263
+ | | a 2-D array; returns |
264
+ | | ``ndarray(num_axis_points, num_curves)``. |
265
+ +------------------------+---------------------------------------------------+
259
266
 
260
267
  For ``ALTERNATE_WITH_X`` / ``ALTERNATE_WITH_Y``:
261
268
 
@@ -324,6 +331,43 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
324
331
  - Assuming MSW swapping affects 8-bit types (it does not).
325
332
  - Using ``ALTERNATE_WITH_X`` / ``ALTERNATE_WITH_Y`` with a 1-D array or
326
333
  without a 2-D ``shape`` parameter.
334
+ - Using ``ALTERNATE_CURVES`` with a 1-D array or a non-2-D ``shape``.
335
+
336
+ .. rubric:: ALTERNATE_CURVES example (3 curves, 5 axis points)
337
+
338
+ Corresponds to the C Array-of-Structs pattern from the ASAM specification::
339
+
340
+ typedef struct { int DT10; int DT20; int DT30; } CURVE_TYPE;
341
+ const CURVE_TYPE DATA[5] = {
342
+ {10, 3, 4}, {12, 2, 6}, {17, 9, 8}, {10, 1, 8}, {18, 3, 8},
343
+ };
344
+
345
+ .. code-block:: python
346
+
347
+ import numpy as np
348
+ from objutils import Image, Section
349
+
350
+ # numpy shape (5 axis_points, 3 curves); ASAM shape (X=3, Y=5)
351
+ curves = np.array(
352
+ [[10, 3, 4],
353
+ [12, 2, 6],
354
+ [17, 9, 8],
355
+ [10, 1, 8],
356
+ [18, 3, 8]],
357
+ dtype=np.int32,
358
+ )
359
+ total = curves.nbytes
360
+ img = Image([Section(0xC000, bytes(total + 8))])
361
+ img.write_asam_ndarray(0xC000, curves, "SLONG", "MSB_LAST",
362
+ index_mode="ALTERNATE_CURVES")
363
+
364
+ result = img.read_asam_ndarray(0xC000, 15, "SLONG",
365
+ shape=(3, 5), byte_order="MSB_LAST",
366
+ index_mode="ALTERNATE_CURVES")
367
+ # result.shape == (5, 3) – each column is one curve
368
+ curve_dt10 = result[:, 0] # [10, 12, 17, 10, 18]
369
+ curve_dt20 = result[:, 1] # [ 3, 2, 9, 1, 3]
370
+ curve_dt30 = result[:, 2] # [ 4, 6, 8, 8, 8]
327
371
 
328
372
  .. rubric:: Copy/paste example: ULONG array roundtrip
329
373
 
@@ -13,7 +13,7 @@ Registers CODECS and implements an interface to them.
13
13
  The first parameter is always the codec name.
14
14
  """
15
15
 
16
- __version__ = "0.10.17"
16
+ __version__ = "0.10.19"
17
17
 
18
18
  __all__ = [
19
19
  "Image",
@@ -667,9 +667,9 @@ class SymbolAPI(DBAPI):
667
667
  Example:
668
668
  >>> parser = ElfParser('firmware.elf')
669
669
  >>> # Find any 'main' symbol
670
- >>> main = parser.symbols.get('main')
670
+ >>> main = parser.coff_symbols.get('main')
671
671
  >>> # Find 'main' in .text section specifically
672
- >>> main_text = parser.symbols.get('main', section_name='.text')
672
+ >>> main_text = parser.coff_symbols.get('main', section_name='.text')
673
673
  """
674
674
  query = self.query(model.Elf_Symbol)
675
675
  if section_name:
@@ -718,18 +718,18 @@ class SymbolAPI(DBAPI):
718
718
  Example:
719
719
  >>> parser = ElfParser('firmware.elf')
720
720
  >>> # Get all global functions
721
- >>> funcs = parser.symbols.fetch(
721
+ >>> funcs = parser.coff_symbols.fetch(
722
722
  ... bindings='g',
723
723
  ... types_str='func'
724
724
  ... )
725
725
  >>> # Get symbols in .text section by address
726
- >>> text_syms = parser.symbols.fetch(
726
+ >>> text_syms = parser.coff_symbols.fetch(
727
727
  ... sections='.text',
728
728
  ... order_by_value=True,
729
729
  ... group_by_section=False
730
730
  ... )
731
731
  >>> # Get GCC special symbols
732
- >>> special = parser.symbols.fetch(
732
+ >>> special = parser.coff_symbols.fetch(
733
733
  ... name_pattern=r'^_'
734
734
  ... )
735
735
  """
@@ -815,7 +815,7 @@ class SymbolAPI(DBAPI):
815
815
 
816
816
  Example:
817
817
  >>> parser = ElfParser('firmware.elf')
818
- >>> special_syms = parser.symbols.fetch_gcc_special_symbols()
818
+ >>> special_syms = parser.coff_symbols.fetch_gcc_special_symbols()
819
819
  >>> for sym in special_syms:
820
820
  ... print(f"{sym.symbol_name}: 0x{sym.st_value:08x}")
821
821
  """
@@ -878,7 +878,7 @@ class ElfParser:
878
878
  >>> parser = ElfParser('firmware.elf')
879
879
  >>> print(f"Machine: {parser.e_machine}")
880
880
  >>> text = parser.sections.get('.text')
881
- >>> main = parser.symbols.get('main')
881
+ >>> main = parser.coff_symbols.get('main')
882
882
  >>> image = parser.create_image()
883
883
 
884
884
  >>> # No .prgdb file written to disk
@@ -926,7 +926,7 @@ class ElfParser:
926
926
  ),
927
927
  )
928
928
 
929
- def __init__(self, filename: str, in_memory: bool = False) -> None:
929
+ def __init__(self, filename: str | Path, in_memory: bool = False) -> None:
930
930
  """Initialize ElfParser with an ELF file.
931
931
 
932
932
  Creates or opens the associated .prgdb database file and parses the ELF
@@ -812,6 +812,10 @@ class Image:
812
812
  - ``"ALTERNATE_WITH_Y"`` – 2-D maps only; each Y-row is preceded by
813
813
  its Y-axis coordinate value. Pass axis values via
814
814
  ``y_axis=<array>`` in *kws*.
815
+ - ``"ALTERNATE_CURVES"`` – multiple 1-D curves sharing a common axis,
816
+ stored as Array-of-Structs (AoS). Array shape must be
817
+ ``(num_axis_points, num_curves)`` in numpy convention.
818
+ Memory layout is identical to C-order ``ROW_DIR``.
815
819
  **kws: Keyword arguments passed through to the section method.
816
820
  Relevant for ALTERNATE modes:
817
821
 
@@ -882,6 +886,9 @@ class Image:
882
886
  by its X-axis coordinate value in memory.
883
887
  - ``"ALTERNATE_WITH_Y"`` – 2-D maps only; each Y-row is preceded by
884
888
  its Y-axis coordinate value in memory.
889
+ - ``"ALTERNATE_CURVES"`` – multiple 1-D curves sharing a common axis,
890
+ stored as Array-of-Structs (AoS); returns
891
+ ``ndarray(num_axis_points, num_curves)``.
885
892
  **kws: Keyword arguments passed through to the section method.
886
893
  Relevant for ALTERNATE modes:
887
894
 
@@ -137,6 +137,7 @@ See Also:
137
137
  """
138
138
 
139
139
  import io
140
+ from dataclasses import dataclass
140
141
  import os
141
142
  import typing
142
143
  from pathlib import Path
@@ -147,6 +148,7 @@ from objutils import Image, Section
147
148
  from objutils.utils import create_memorymapped_fileview
148
149
 
149
150
  from . import defs, model
151
+ from ..symbols import VariableType
150
152
 
151
153
  try:
152
154
  from .pdb import pdb_symbols_for_pe # type: ignore
@@ -220,6 +222,16 @@ CoffSymbol = Struct(
220
222
  )
221
223
 
222
224
 
225
+ @dataclass(slots=True)
226
+ class Symbol:
227
+ name: str
228
+ value: int
229
+ section_number: int
230
+ type: int
231
+ storage_class: int
232
+ location: int
233
+
234
+
223
235
  class PeParser:
224
236
  """Parser for PE/COFF executables and object files.
225
237
 
@@ -238,7 +250,7 @@ class PeParser:
238
250
  coff_header: COFF header dictionary (machine, sections, characteristics)
239
251
  optional_header: Optional header dictionary (image_base, entry_point, alignments)
240
252
  sections: List of section dictionaries (name, vaddr, size, characteristics)
241
- symbols: List of symbol dictionaries (name, value, section, type)
253
+ coff_symbols: List of symbol dictionaries (name, value, section, type)
242
254
  db: Optional SQLAlchemy database model for querying
243
255
 
244
256
  Example:
@@ -297,7 +309,8 @@ class PeParser:
297
309
  self.coff_header: dict[str, int] | None = None
298
310
  self.optional_header: dict[str, int] | None = None
299
311
  self.sections: list[dict[str, typing.Any]] = []
300
- self.symbols: list[dict[str, typing.Any]] = []
312
+ self.coff_symbols: list[Symbol] = []
313
+ self.pdb_symbols: list[VariableType] = []
301
314
 
302
315
  # DB model
303
316
  self.db: model.Model | None = None
@@ -423,6 +436,7 @@ class PeParser:
423
436
 
424
437
  # Section table
425
438
  self.sections = []
439
+ self.section_start_addresses = []
426
440
  for i in range(number_of_sections):
427
441
  section_hdr = SectionHeader.parse_stream(f)
428
442
  # name may be slash + offset into string table for long names in OBJ; in PE, usually inline
@@ -437,21 +451,26 @@ class PeParser:
437
451
  "characteristics": section_hdr.characteristics,
438
452
  }
439
453
  )
454
+ self.section_start_addresses.append(section_hdr.virtual_address)
440
455
 
441
456
  # Symbols (COFF symbol table) if present
442
- self.symbols = []
457
+ self.coff_symbols = []
443
458
  if self.coff_header["pointer_to_symbol_table"] and self.coff_header["number_of_symbols"]:
444
459
  self._parse_coff_symbols()
445
460
  # If no COFF symbols, try PDB symbols via dbghelp (best effort)
446
- if not self.symbols and pdb_symbols_for_pe:
461
+ if not self.coff_symbols and pdb_symbols_for_pe:
447
462
  try:
448
- # pdb_file = str(self._pdb_path) if self._pdb_path else str(self._path)
449
- # self.symbols = pdb_symbols_for_pe(pdb_file) # type: ignore[misc]
450
- self.symbols = pdb_symbols_for_pe(self._path, self._pdb_path) # type: ignore[misc]
463
+ self.pdb_symbols = pdb_symbols_for_pe(self._path, self._pdb_path) # type: ignore[misc]
451
464
  except (OSError, RuntimeError, ValueError) as e:
452
465
  # Best-effort only; ignore if PDB not available
453
466
  print(f"Failed to retrieve PDB symbols: {e}")
454
467
 
468
+ def symbol_addresses(self, symbol_names: list[str]) -> dict[str | int]:
469
+ if self.coff_symbols:
470
+ return {sym.name: sym.location for sym in self.coff_symbols if sym.name in symbol_names}
471
+ elif self.pdb_symbols:
472
+ return {sym.name: sym.location for sym in self.pdb_symbols if sym.name in symbol_names}
473
+
455
474
  def _parse_coff_symbols(self) -> None:
456
475
  """Parse COFF symbol table and string table.
457
476
 
@@ -503,6 +522,7 @@ class PeParser:
503
522
 
504
523
  f.seek(start_symtab)
505
524
  i = 0
525
+ MAX_SECTIONS = len(self.sections)
506
526
  while i < count:
507
527
  rec = f.read(symrec_size)
508
528
  if len(rec) < symrec_size:
@@ -510,14 +530,31 @@ class PeParser:
510
530
  symbol = CoffSymbol.parse(rec)
511
531
  name8 = symbol.name_raw
512
532
  name = get_name(name8)
513
- self.symbols.append(
514
- {
515
- "name": name,
516
- "value": symbol.value,
517
- "section_number": symbol.section_number,
518
- "type": symbol.type,
519
- "storage_class": symbol.storage_class,
520
- }
533
+ if symbol.storage_class in (2, 3) and symbol.section_number <= MAX_SECTIONS:
534
+ try:
535
+ address_base = self.section_start_addresses[symbol.section_number - 1] + symbol.value
536
+ except IndexError:
537
+ address_base = None
538
+ else:
539
+ address_base = None
540
+ """
541
+ class Symbol:
542
+ name: str
543
+ value: int
544
+ section_number: int
545
+ type: int
546
+ storage_class: int
547
+ location: int
548
+ """
549
+ self.coff_symbols.append(
550
+ Symbol(
551
+ name=name,
552
+ value=symbol.value,
553
+ section_number=symbol.section_number,
554
+ type=symbol.type,
555
+ storage_class=symbol.storage_class,
556
+ location=address_base,
557
+ )
521
558
  )
522
559
  # Skip aux records
523
560
  if symbol.number_of_aux_symbols:
@@ -79,6 +79,8 @@ See Also:
79
79
  https://docs.microsoft.com/windows/win32/debug/pe-format
80
80
  """
81
81
 
82
+ from enum import IntEnum
83
+
82
84
  # PE file signature (follows DOS header at offset 0x3C)
83
85
  PE_SIGNATURE = b"PE\x00\x00"
84
86
 
@@ -165,6 +167,31 @@ IMAGE_SYM_CLASS_EXTERNAL = 2 # External (public) symbol
165
167
  IMAGE_SYM_CLASS_STATIC = 3 # Static (private) symbol
166
168
 
167
169
 
170
+ # ============================================================================
171
+ # Symbol Types (IMAGE_SYM_TYPE_*)
172
+ # ============================================================================
173
+ # Microsoft COFF Symbol Base Types.
174
+
175
+
176
+ class ImageSym(IntEnum):
177
+ IMAGE_SYM_TYPE_NULL = 0 # No type information or unknown base type. Microsoft tools use this setting
178
+ IMAGE_SYM_TYPE_VOID = 1 # No valid type; used with void pointers and functions
179
+ IMAGE_SYM_TYPE_CHAR = 2 # A character (signed byte)
180
+ IMAGE_SYM_TYPE_SHORT = 3 # A 2-byte signed integer
181
+ IMAGE_SYM_TYPE_INT = 4 # A natural integer type (normally 4 bytes in Windows)
182
+ IMAGE_SYM_TYPE_LONG = 5 # A 4-byte signed integer
183
+ IMAGE_SYM_TYPE_FLOAT = 6 # A 4-byte floating-point number
184
+ IMAGE_SYM_TYPE_DOUBLE = 7 # An 8-byte floating-point number
185
+ IMAGE_SYM_TYPE_STRUCT = 8 # A structure
186
+ IMAGE_SYM_TYPE_UNION = 9 # A union
187
+ IMAGE_SYM_TYPE_ENUM = 10 # An enumerated type
188
+ IMAGE_SYM_TYPE_MOE = 11 # A member of enumeration (a specific value)
189
+ IMAGE_SYM_TYPE_BYTE = 12 # A byte; unsigned 1-byte integer
190
+ IMAGE_SYM_TYPE_WORD = 13 # A word; unsigned 2-byte integer
191
+ IMAGE_SYM_TYPE_UINT = 14 # An unsigned integer of natural size (normally, 4 bytes)
192
+ IMAGE_SYM_TYPE_DWORD = 15 # An unsigned 4-byte integer
193
+
194
+
168
195
  def decode_characteristics(characteristics: int) -> list[str]:
169
196
  """Decode COFF header characteristics flags into readable strings.
170
197
 
@@ -1421,7 +1421,7 @@ def pdb_symbols_for_pe(pe_path: str, symbol_path: str | None = None) -> list[dic
1421
1421
  continue
1422
1422
  ti = session.type_info(mod_base, sym.TypeIndex)
1423
1423
  # print(f"{sym.tag:15}", sym.Name, hex(sym.Address - mod_base), sym.Size, sym.decode_flags(), "==>", ti)
1424
- result.append(symbols.VariableType(sym.Name, ti, sym.Address - mod_base, sym.Size))
1424
+ result.append(symbols.VariableType(sym.Name.decode("utf8"), ti, sym.Address - mod_base, sym.Size))
1425
1425
  return result
1426
1426
  """
1427
1427
  Name: Symbol name (null-terminated char array)
@@ -71,7 +71,8 @@ def main(argv: list[str] | None = None) -> int:
71
71
  )
72
72
 
73
73
  # Symbols
74
- for sym in pp.symbols:
74
+ for sym in pp.coff_symbols:
75
+ print(sym)
75
76
  ses.add(
76
77
  pe_model.Pe_Symbol(
77
78
  name=sym["name"],
@@ -54,15 +54,29 @@ def main(argv: list[str] | None = None) -> int:
54
54
  f"0x{s['size_of_raw_data']:06X} 0x{s['virtual_size']:06X}"
55
55
  )
56
56
 
57
- if pp.symbols and args.symbols:
58
- # pp.symbols = sorted(pp.symbols, key=lambda s: s.name)
59
- pp.symbols = sorted(pp.symbols, key=lambda s: s.location)
60
-
61
- print_header("Symbols (COFF or PDB)")
62
- print("Name Value Size")
63
- print("-" * 80)
64
- for sym in pp.symbols:
65
- print(f"{sym.name.decode():<50} 0x{sym.location:016X} {sym.size}")
57
+ if args.symbols:
58
+ if pp.pdb_symbols:
59
+ coff_symbols = sorted(pp.pdb_symbols, key=lambda s: s.location)
60
+
61
+ print_header("Symbols (PDB)")
62
+ print("Name Value Size")
63
+ print("-" * 80)
64
+ for sym in coff_symbols:
65
+ print(f"{sym.name:<50} 0x{sym.location:016X} {sym.size}")
66
+ elif pp.coff_symbols:
67
+
68
+ def pe_sorter(s: dict):
69
+ return 0 if s.location is None else s.location
70
+
71
+ coff_symbols = sorted(pp.coff_symbols, key=pe_sorter)
72
+
73
+ print_header("Symbols (COFF)")
74
+ print("Name Value")
75
+ print("-" * 80)
76
+ for sym in coff_symbols:
77
+ if sym.storage_class not in (2, 3) or sym.location is None:
78
+ continue
79
+ print(f"{sym.name:<50} 0x{int(sym.location):016X}")
66
80
  return 0
67
81
 
68
82
 
@@ -36,23 +36,29 @@ def main(argv: list[str] | None = None) -> int:
36
36
 
37
37
  # Fetch via SymbolAPI to ensure DB is created/reused
38
38
  # syms = SymbolAPI(pp).fetch(name_pattern=args.pattern)
39
- syms = pp.symbols
40
-
41
- # Fallback: if SymbolAPI attr is not present (static type), use direct list
42
- # if not syms and pp.symbols:
43
- # syms = [type("_S", (), s) for s in pp.symbols] # quick adapter for printing
44
-
45
- # syms is a list of model.Pe_Symbol; order by value already in fetch()
46
- if args.order_by == "N":
47
- syms = sorted(syms, key=lambda s: getattr(s, "name", getattr(s, "symbol_name", "")))
48
-
49
- print("Name")
50
- print("Value")
51
- print("-" * 79)
52
- for sym in syms:
53
- name = getattr(sym, "name", getattr(sym, "symbol_name", ""))
54
- value = getattr(sym, "value", getattr(sym, "st_value", 0))
55
- print(f"{name:40}\n0x{int(value):016X}\n")
39
+ syms = pp.coff_symbols
40
+ if syms:
41
+ if args.order_by == "N":
42
+ syms = sorted(syms, key=lambda s: getattr(s, "name", getattr(s, "symbol_name", "")))
43
+
44
+ print("Name")
45
+ print("Value")
46
+ print("-" * 79)
47
+ for sym in syms:
48
+ if not sym.storage_class in (2, 3) or sym.location is None:
49
+ continue
50
+ name = sym.name
51
+ value = sym.value
52
+ address = sym.location
53
+ print(f"{name:40}\n0x{int(value):016X} 0x{int(address):016X}\n")
54
+ syms = pp.pdb_symbols
55
+ if syms:
56
+ syms = sorted(syms, key=lambda s: getattr(s, "name", ""))
57
+ for sym in syms:
58
+ name = sym.name
59
+ name = name.decode("utf-8") if isinstance(name, bytes) else name
60
+ location = sym.location
61
+ print(f"{name:40}\n0x{location:016X}\n")
56
62
 
57
63
  return 0
58
64
 
@@ -427,7 +427,7 @@ def fortran_array_to_buffer(array: np.ndarray) -> bytearray:
427
427
  return result
428
428
 
429
429
 
430
- ASAM_INDEX_MODES = {"ROW_DIR", "COLUMN_DIR", "ALTERNATE_WITH_X", "ALTERNATE_WITH_Y"}
430
+ ASAM_INDEX_MODES = {"ROW_DIR", "COLUMN_DIR", "ALTERNATE_WITH_X", "ALTERNATE_WITH_Y", "ALTERNATE_CURVES"}
431
431
 
432
432
  AlternateArrayResult = namedtuple("AlternateArrayResult", "values axis")
433
433
 
@@ -1273,7 +1273,12 @@ class Section:
1273
1273
  index_mode: ``"ROW_DIR"`` (default) – X increments fastest
1274
1274
  (C-like row-major). ``"COLUMN_DIR"`` – Y increments
1275
1275
  fastest; only X and Y are swapped (not true column-major
1276
- for dims > 2).
1276
+ for dims > 2). ``"ALTERNATE_WITH_X"`` / ``"ALTERNATE_WITH_Y"``
1277
+ – 2-D maps with interleaved axis values (see
1278
+ :meth:`read_asam_ndarray`). ``"ALTERNATE_CURVES"`` – multiple
1279
+ 1-D curves sharing a common axis, stored as Array-of-Structs;
1280
+ array shape must be ``(num_axis_points, num_curves)`` in numpy
1281
+ convention.
1277
1282
  **kws: Passed through to :meth:`write`.
1278
1283
 
1279
1284
  Raises:
@@ -1314,6 +1319,17 @@ class Section:
1314
1319
  # element size; for different element sizes the permutation is applied per data-dtype
1315
1320
  # stride which may be incorrect – a documented limitation for word-swap byte orders.
1316
1321
  permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
1322
+ elif index_mode == "ALTERNATE_CURVES":
1323
+ # ALTERNATE_CURVES: multiple curves sharing a common axis, stored as
1324
+ # Array-of-Structs (AoS). Array shape must be (num_axis_points, num_curves)
1325
+ # in numpy convention. Each row in memory contains all curve values at one
1326
+ # axis breakpoint. This is identical to C-order (ROW_DIR) for a 2-D array.
1327
+ if typed_array.ndim != 2:
1328
+ raise ValueError(
1329
+ "ALTERNATE_CURVES requires a 2-D array with shape " "(num_axis_points, num_curves) in numpy convention"
1330
+ )
1331
+ raw_data = typed_array.tobytes() # C-order = AoS
1332
+ permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
1317
1333
  else:
1318
1334
  raw_data = typed_array.tobytes()
1319
1335
  permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
@@ -1371,9 +1387,11 @@ class Section:
1371
1387
  - ``"ALTERNATE_WITH_X"`` – 2-D maps only; columns of values alternate
1372
1388
  with X-axis coordinate values. Returns
1373
1389
  :class:`AlternateArrayResult` ``(values, x_axis)``.
1374
- - ``"ALTERNATE_WITH_Y"`` – 2-D maps only; rows of values alternate
1375
- with Y-axis coordinate values. Returns
1376
- :class:`AlternateArrayResult` ``(values, y_axis)``.
1390
+ - ``"ALTERNATE_CURVES"`` – 1-D curves with a shared axis, stored
1391
+ as Array-of-Structs (AoS). *shape* must be
1392
+ ``(num_curves, num_axis_points)`` in ASAM convention.
1393
+ Returns ``ndarray`` with shape
1394
+ ``(num_axis_points, num_curves)``; each column is one curve.
1377
1395
  **kws: Optional keyword arguments:
1378
1396
 
1379
1397
  - ``axis_dtype`` (str): ASAM datatype of axis values for
@@ -1400,6 +1418,20 @@ class Section:
1400
1418
  # Convert ASAM shape (X, Y, Z …) → numpy shape (… Z, Y, X).
1401
1419
  numpy_shape = tuple(reversed(shape)) if shape else None
1402
1420
 
1421
+ # --- ALTERNATE_CURVES --------------------------------------------------
1422
+ if index_mode == "ALTERNATE_CURVES":
1423
+ if numpy_shape is None or len(numpy_shape) != 2:
1424
+ raise ValueError("ALTERNATE_CURVES requires a 2-D shape (num_curves, num_axis_points) " "in ASAM convention")
1425
+ type_name = internal_dtype.split("_")[0]
1426
+ type_size = TYPE_SIZES[type_name]
1427
+ byte_count = length * type_size
1428
+ raw_data = self.read(addr, byte_count, **kws)
1429
+ permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
1430
+ # numpy_shape is (num_axis_points, num_curves) after ASAM reversal –
1431
+ # exactly the shape of the C-order (AoS) buffer.
1432
+ flat = np.frombuffer(permuted, dtype=dt)
1433
+ return flat.reshape(numpy_shape)
1434
+
1403
1435
  # --- ALTERNATE_WITH_X --------------------------------------------------
1404
1436
  if index_mode == "ALTERNATE_WITH_X":
1405
1437
  if numpy_shape is None or len(numpy_shape) != 2: