flatline 0.1.1__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 (279) hide show
  1. flatline-0.1.1/.clang-format +4 -0
  2. flatline-0.1.1/.gitignore +56 -0
  3. flatline-0.1.1/.gitmodules +3 -0
  4. flatline-0.1.1/CHANGELOG.md +106 -0
  5. flatline-0.1.1/LICENSE +201 -0
  6. flatline-0.1.1/NOTICE +15 -0
  7. flatline-0.1.1/PKG-INFO +23 -0
  8. flatline-0.1.1/README.md +215 -0
  9. flatline-0.1.1/docs/compliance.md +64 -0
  10. flatline-0.1.1/docs/host_feasibility.md +73 -0
  11. flatline-0.1.1/docs/release_notes.md +96 -0
  12. flatline-0.1.1/docs/specs.md +774 -0
  13. flatline-0.1.1/docs/wheel_matrix.md +65 -0
  14. flatline-0.1.1/docs-site/explanation/architecture.md +140 -0
  15. flatline-0.1.1/docs-site/explanation/isa-support.md +112 -0
  16. flatline-0.1.1/docs-site/getting-started.md +217 -0
  17. flatline-0.1.1/docs-site/how-to/analysis-budget.md +145 -0
  18. flatline-0.1.1/docs-site/how-to/enumerate-languages.md +94 -0
  19. flatline-0.1.1/docs-site/how-to/handle-errors.md +228 -0
  20. flatline-0.1.1/docs-site/how-to/index.md +13 -0
  21. flatline-0.1.1/docs-site/how-to/load-from-binary.md +9 -0
  22. flatline-0.1.1/docs-site/how-to/session-management.md +114 -0
  23. flatline-0.1.1/docs-site/index.md +53 -0
  24. flatline-0.1.1/docs-site/installation.md +72 -0
  25. flatline-0.1.1/docs-site/reference/api.md +85 -0
  26. flatline-0.1.1/docs-site/reference/errors.md +132 -0
  27. flatline-0.1.1/docs-site/reference/index.md +12 -0
  28. flatline-0.1.1/meson.build +17 -0
  29. flatline-0.1.1/meson_options.txt +6 -0
  30. flatline-0.1.1/mkdocs.yml +66 -0
  31. flatline-0.1.1/pyproject.toml +159 -0
  32. flatline-0.1.1/src/flatline/__init__.py +98 -0
  33. flatline-0.1.1/src/flatline/_bridge.py +740 -0
  34. flatline-0.1.1/src/flatline/_errors.py +98 -0
  35. flatline-0.1.1/src/flatline/_flatline_native.cpp +1020 -0
  36. flatline-0.1.1/src/flatline/_models.py +488 -0
  37. flatline-0.1.1/src/flatline/_runtime_data.py +250 -0
  38. flatline-0.1.1/src/flatline/_session.py +164 -0
  39. flatline-0.1.1/src/flatline/_version.py +9 -0
  40. flatline-0.1.1/src/flatline/meson.build +252 -0
  41. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/.gitignore +19 -0
  42. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/Doxyfile +1184 -0
  43. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile +414 -0
  44. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/action.cc +1162 -0
  45. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/action.hh +327 -0
  46. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/address.cc +836 -0
  47. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/address.hh +581 -0
  48. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/analyzesigs.cc +243 -0
  49. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/analyzesigs.hh +67 -0
  50. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/architecture.cc +1570 -0
  51. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/architecture.hh +414 -0
  52. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/bfd_arch.cc +175 -0
  53. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/bfd_arch.hh +56 -0
  54. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/block.cc +3723 -0
  55. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/block.hh +912 -0
  56. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/blockaction.cc +2366 -0
  57. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/blockaction.hh +361 -0
  58. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/callgraph.cc +468 -0
  59. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/callgraph.hh +128 -0
  60. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/capability.cc +51 -0
  61. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/capability.hh +55 -0
  62. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cast.cc +546 -0
  63. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cast.hh +205 -0
  64. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/codedata.cc +792 -0
  65. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/codedata.hh +200 -0
  66. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/comment.cc +406 -0
  67. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/comment.hh +255 -0
  68. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/comment_ghidra.cc +83 -0
  69. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/comment_ghidra.hh +57 -0
  70. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/compression.cc +165 -0
  71. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/compression.hh +100 -0
  72. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/condexe.cc +712 -0
  73. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/condexe.hh +199 -0
  74. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/consolemain.cc +251 -0
  75. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/constseq.cc +1004 -0
  76. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/constseq.hh +142 -0
  77. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/context.cc +239 -0
  78. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/context.hh +204 -0
  79. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc +5741 -0
  80. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.hh +1085 -0
  81. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cover.cc +654 -0
  82. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cover.hh +134 -0
  83. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cpool.cc +245 -0
  84. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cpool.hh +211 -0
  85. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cpool_ghidra.cc +70 -0
  86. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/cpool_ghidra.hh +47 -0
  87. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/crc32.cc +74 -0
  88. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/crc32.hh +37 -0
  89. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/database.cc +3430 -0
  90. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/database.hh +996 -0
  91. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/database_ghidra.cc +383 -0
  92. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/database_ghidra.hh +143 -0
  93. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/doccore.hh +340 -0
  94. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/docmain.hh +425 -0
  95. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/double.cc +3647 -0
  96. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/double.hh +375 -0
  97. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/dynamic.cc +773 -0
  98. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/dynamic.hh +108 -0
  99. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/emulate.cc +462 -0
  100. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/emulate.hh +551 -0
  101. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/emulateutil.cc +397 -0
  102. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/emulateutil.hh +178 -0
  103. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/error.hh +101 -0
  104. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/expression.cc +562 -0
  105. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/expression.hh +180 -0
  106. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/filemanage.cc +414 -0
  107. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/filemanage.hh +57 -0
  108. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/float.cc +673 -0
  109. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/float.hh +100 -0
  110. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/flow.cc +1460 -0
  111. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/flow.hh +172 -0
  112. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc +5976 -0
  113. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.hh +1784 -0
  114. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.cc +1122 -0
  115. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata.hh +727 -0
  116. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.cc +1095 -0
  117. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_op.cc +1500 -0
  118. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc +2239 -0
  119. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_arch.cc +955 -0
  120. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_arch.hh +173 -0
  121. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_context.cc +45 -0
  122. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_context.hh +78 -0
  123. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_process.cc +529 -0
  124. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_process.hh +245 -0
  125. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_translate.cc +178 -0
  126. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_translate.hh +60 -0
  127. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/globalcontext.cc +618 -0
  128. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/globalcontext.hh +334 -0
  129. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.cc +3338 -0
  130. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.hh +294 -0
  131. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/grammar.y +1592 -0
  132. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/graph.cc +502 -0
  133. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/graph.hh +28 -0
  134. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/heritage.cc +2872 -0
  135. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/heritage.hh +342 -0
  136. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc +3687 -0
  137. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.hh +681 -0
  138. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ifaceterm.cc +271 -0
  139. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ifaceterm.hh +58 -0
  140. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/inject_ghidra.cc +236 -0
  141. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/inject_ghidra.hh +97 -0
  142. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/inject_sleigh.cc +520 -0
  143. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/inject_sleigh.hh +135 -0
  144. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/interface.cc +618 -0
  145. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/interface.hh +301 -0
  146. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/jumptable.cc +2861 -0
  147. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/jumptable.hh +645 -0
  148. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/libdecomp.cc +64 -0
  149. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/libdecomp.hh +39 -0
  150. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage.cc +116 -0
  151. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage.hh +230 -0
  152. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_bfd.cc +303 -0
  153. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_bfd.hh +94 -0
  154. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_ghidra.cc +55 -0
  155. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_ghidra.hh +45 -0
  156. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_xml.cc +298 -0
  157. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_xml.hh +59 -0
  158. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/marshal.cc +1273 -0
  159. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/marshal.hh +753 -0
  160. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/memstate.cc +738 -0
  161. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/memstate.hh +208 -0
  162. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/merge.cc +1695 -0
  163. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/merge.hh +177 -0
  164. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/modelrules.cc +1711 -0
  165. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/modelrules.hh +573 -0
  166. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/multiprecision.cc +334 -0
  167. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/multiprecision.hh +42 -0
  168. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc +1213 -0
  169. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/op.hh +355 -0
  170. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc +794 -0
  171. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.hh +541 -0
  172. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/opcodes.cc +137 -0
  173. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/opcodes.hh +139 -0
  174. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/options.cc +1063 -0
  175. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/options.hh +354 -0
  176. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/override.cc +435 -0
  177. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/override.hh +95 -0
  178. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/paramid.cc +284 -0
  179. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/paramid.hh +82 -0
  180. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/partmap.hh +233 -0
  181. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodecompile.cc +781 -0
  182. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodecompile.hh +108 -0
  183. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeinject.cc +361 -0
  184. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeinject.hh +277 -0
  185. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.cc +3303 -0
  186. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.hh +101 -0
  187. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcodeparse.y +805 -0
  188. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcoderaw.cc +124 -0
  189. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/pcoderaw.hh +243 -0
  190. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/prefersplit.cc +631 -0
  191. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/prefersplit.hh +75 -0
  192. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/prettyprint.cc +1245 -0
  193. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/prettyprint.hh +1140 -0
  194. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printc.cc +3401 -0
  195. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printc.hh +373 -0
  196. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printjava.cc +365 -0
  197. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printjava.hh +78 -0
  198. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printlanguage.cc +820 -0
  199. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/printlanguage.hh +590 -0
  200. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/rangemap.hh +426 -0
  201. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.cc +2605 -0
  202. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/rangeutil.hh +410 -0
  203. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/raw_arch.cc +130 -0
  204. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/raw_arch.hh +55 -0
  205. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc +10998 -0
  206. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.hh +1609 -0
  207. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/rulecompile.cc +1013 -0
  208. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/rulecompile.hh +205 -0
  209. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/ruleparse.y +277 -0
  210. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.cc +962 -0
  211. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/semantics.hh +215 -0
  212. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/signature.cc +1148 -0
  213. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/signature.hh +357 -0
  214. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/signature_ghidra.cc +119 -0
  215. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/signature_ghidra.hh +78 -0
  216. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slaformat.cc +258 -0
  217. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slaformat.hh +205 -0
  218. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh.cc +813 -0
  219. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh.hh +529 -0
  220. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc +632 -0
  221. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.hh +153 -0
  222. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleighbase.cc +381 -0
  223. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleighbase.hh +94 -0
  224. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/sleighexample.cc +407 -0
  225. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc +4074 -0
  226. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.hh +489 -0
  227. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.cc +3871 -0
  228. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.hh +246 -0
  229. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghparse.y +584 -0
  230. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghpatexpress.cc +1674 -0
  231. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghpatexpress.hh +490 -0
  232. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghpattern.cc +999 -0
  233. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghpattern.hh +174 -0
  234. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.cc +3588 -0
  235. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghscan.l +683 -0
  236. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghsymbol.cc +2484 -0
  237. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/slghsymbol.hh +636 -0
  238. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/space.cc +682 -0
  239. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/space.hh +554 -0
  240. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/string_ghidra.cc +50 -0
  241. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/string_ghidra.hh +42 -0
  242. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/stringmanage.cc +477 -0
  243. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/stringmanage.hh +97 -0
  244. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/subflow.cc +4130 -0
  245. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/subflow.hh +459 -0
  246. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/test.cc +174 -0
  247. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/test.hh +115 -0
  248. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc +399 -0
  249. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh +102 -0
  250. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/transform.cc +767 -0
  251. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/transform.hh +256 -0
  252. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/translate.cc +1018 -0
  253. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/translate.hh +616 -0
  254. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc +4674 -0
  255. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/type.hh +968 -0
  256. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/typegrp_ghidra.cc +38 -0
  257. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/typegrp_ghidra.hh +41 -0
  258. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/typeop.cc +2572 -0
  259. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/typeop.hh +916 -0
  260. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/types.h +101 -0
  261. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/unify.cc +1647 -0
  262. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/unify.hh +711 -0
  263. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/unionresolve.cc +1110 -0
  264. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/unionresolve.hh +183 -0
  265. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/userop.cc +648 -0
  266. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/userop.hh +361 -0
  267. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/variable.cc +1203 -0
  268. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/variable.hh +314 -0
  269. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/varmap.cc +1620 -0
  270. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/varmap.hh +269 -0
  271. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/varnode.cc +2053 -0
  272. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/varnode.hh +431 -0
  273. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml.cc +2510 -0
  274. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml.hh +403 -0
  275. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml.y +652 -0
  276. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml_arch.cc +159 -0
  277. flatline-0.1.1/third_party/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp/xml_arch.hh +55 -0
  278. flatline-0.1.1/third_party/ghidra/LICENSE +201 -0
  279. flatline-0.1.1/third_party/ghidra/NOTICE +49 -0
@@ -0,0 +1,4 @@
1
+ BasedOnStyle: Google
2
+ Standard: c++20
3
+ ColumnLimit: 99
4
+ IndentWidth: 4
@@ -0,0 +1,56 @@
1
+ # Byte-compiled / optimized / DLL cache
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions and shared libraries
7
+ *.so
8
+ *.o
9
+ *.a
10
+ *.dylib
11
+
12
+ # Distribution / packaging
13
+ build/
14
+ dist/
15
+ *.egg-info/
16
+ *.egg
17
+ wheels/
18
+
19
+ # Virtual environments
20
+ .venv/
21
+ venv/
22
+ ENV/
23
+
24
+ # pytest
25
+ .pytest_cache/
26
+
27
+ # Coverage
28
+ htmlcov/
29
+ .coverage
30
+ .coverage.*
31
+ coverage.xml
32
+
33
+ # mypy / type checkers
34
+ .mypy_cache/
35
+ .pytype/
36
+
37
+ # Ruff
38
+ .ruff_cache/
39
+
40
+ # Tox
41
+ .tox/
42
+
43
+ # Claude Code
44
+ .claude/settings.local.json
45
+ docs/tasks/
46
+
47
+ # IDE
48
+ .vscode/
49
+ .idea/
50
+ *.swp
51
+ *.swo
52
+ *~
53
+
54
+ # OS
55
+ .DS_Store
56
+ Thumbs.db
@@ -0,0 +1,3 @@
1
+ [submodule "third_party/ghidra"]
2
+ path = third_party/ghidra
3
+ url = https://github.com/NationalSecurityAgency/ghidra
@@ -0,0 +1,106 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.1] - 2026-03-28
11
+
12
+ ### Added
13
+ - Opt-in enriched output via `DecompileRequest.include_enriched_output` and
14
+ `DecompileResult.enriched_output`, exposing post-simplification pcode ops and
15
+ varnode use-def graphs as frozen value types
16
+
17
+ ### Changed
18
+ - `VersionInfo` now exposes `decompiler_version` (Ghidra engine version) instead
19
+ of `upstream_tag` and `upstream_commit`
20
+ - `ghidra-sleigh` dependency is no longer pinned to an exact version
21
+ - Compliance attribution references the vendored decompiler source via the
22
+ `third_party/ghidra` git submodule instead of hardcoded tag/commit constants
23
+ - `metadata["decompiler_version"]` in `DecompileResult` now always reflects the
24
+ Ghidra decompiler engine version, not the flatline package version
25
+ - Manual TestPyPI release dispatches now require a unique package version
26
+ instead of silently skipping duplicate uploads
27
+ - The supported runtime-host contract now includes macOS arm64 and Windows
28
+ x86_64; Linux aarch64 and macOS x86_64 remain published-wheel-only targets
29
+ pending dedicated equivalent-contract lanes
30
+ - The Tier-1 wheel matrix is now validated end to end on TestPyPI ahead of the
31
+ first production PyPI publish
32
+ - Release readiness tooling and docs now audit the staged `0.1.1` production
33
+ publish path after collapsing the prior `0.1.1.dev1` TestPyPI candidate, and
34
+ they keep the GitHub-release trigger to PyPI explicit
35
+ - The public `0.1.x` release-line policy now explicitly allows
36
+ backward-compatible support expansion and opt-in capabilities to ship as
37
+ documented patch releases while flatline remains pre-1.0
38
+
39
+ ### Removed
40
+ - `UPSTREAM_TAG` and `UPSTREAM_COMMIT` constants from `flatline._version`
41
+ - Runtime pin-drift warning when `ghidra-sleigh` version differs from a
42
+ hardcoded baseline
43
+
44
+ ## [0.1.0] - 2026-03-15
45
+
46
+ ### Added
47
+ - Native C++ decompiler bridge via nanobind (session lifecycle, target selection,
48
+ decompile pipeline)
49
+ - End-to-end decompilation verified: x86_64 produces correct structured C output
50
+ - Ghidra decompiler library compilation and native startup/pair enumeration
51
+ - Runtime-data bridge enumeration with fallback for malformed `.ldefs`
52
+ - `ghidra-sleigh` package design for compiled Sleigh runtime data (ADR-010)
53
+ - `.sla` assets compiled for priority ISAs (DATA, x86, AARCH64, RISCV, MIPS)
54
+ - Meson build system with C++20, nanobind, debug/release/debugoptimized build types
55
+ - Python data models and `FlatlineError` error hierarchy
56
+ - `AnalysisBudget` frozen value type with per-request `max_instructions` default
57
+ of 100,000 instructions (ADR-005)
58
+ - Structured `WarningItem` / `ErrorItem` diagnostics with full filesystem paths
59
+ for debuggability (ADR-006)
60
+ - `configuration_error` category for user-fixable install, startup, and
61
+ runtime-data failures (ADR-011)
62
+ - Compliance process: `LICENSE` + `NOTICE` shipped in wheels/sdists, pinned-source
63
+ manifest in `docs/compliance.md`, and `python tools/compliance.py` audit (ADR-007)
64
+ - Auto-discovery of `ghidra-sleigh` runtime data when `runtime_data_dir` is omitted,
65
+ with a runtime warning on upstream pin drift (ADR-004)
66
+ - Default-install footprint measurement via `python tools/footprint.py` with
67
+ baseline recorded in `docs/footprint.md`
68
+ - Built artifact audit for wheel/sdist validation via `python tools/artifacts.py`
69
+ - Committed native memory fixtures for x86_64, x86_32, AArch64, RISC-V 64, and
70
+ MIPS32 under `tests/fixtures/*.hex`
71
+ - Fixture source snippets and regeneration script under `tests/fixtures/sources/`
72
+ - Warm-session p95 regression budgets across priority-ISA add fixtures and
73
+ the switch fixture
74
+ - Switch-site regression baseline asserting recovered site `0x1009` and 9 targets
75
+ - GitHub Actions CI with lint/build on `ubuntu-latest`, test/regression lanes
76
+ pinned to `ubuntu-24.04`, and Python 3.13/3.14 matrix
77
+ - Tox configuration for multi-version Python testing (py313, py314, dev, lint)
78
+ - Code style guide enforcing ASCII-only source files via ruff
79
+ - ADR-009 decided: ISA variant scope (x86 32+64, ARM64, RISC-V 64, MIPS32)
80
+ - ADR-010 decided: separate `ghidra-sleigh` pip package for runtime data
81
+ - Initial public release notes documenting contract guarantees, support tiers,
82
+ known-variant limits, and upgrade policy
83
+ - Public artifact review checklist documenting the final human sign-off gate
84
+ for the initial public release
85
+ - Initial public release workflow documentation and a release-readiness audit
86
+ that keeps the `0.1.0` first-public-tag recommendation explicit
87
+
88
+ ### Changed
89
+ - Renamed project from ghidralib to flatline repo-wide
90
+ - Repository agent instructions now live in `AGENTS.md` / `CLAUDE.md`
91
+ - Upstream pin bumped to `Ghidra_12.0.4_build` (`e40ed13014`)
92
+ - `third_party/ghidra` tracked as a git submodule instead of a plain checkout
93
+ - Tox `py313`/`py314` envs now build and test installed wheel artifacts
94
+ instead of the source tree
95
+ - Dev-only release helpers moved from `src/flatline` to `tools/flatline_dev/`,
96
+ excluded from wheel and sdist distribution artifacts
97
+ - Version strings normalized to PEP 440 form `0.1.0.dev0`
98
+ - Initial public release workflow now keeps the manual artifact checklist
99
+ source-controlled while the review notes stay outside the repo
100
+
101
+ ### Fixed
102
+ - Size-aware `std::string` construction for `nb::bytes` to preserve embedded
103
+ null bytes
104
+ - Editable native rebuild nanobind paths
105
+ - Tolerance for malformed `.ldefs` during runtime-data enumeration
106
+ - Dist script reference guarded for sdist-to-wheel builds
flatline-0.1.1/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
flatline-0.1.1/NOTICE ADDED
@@ -0,0 +1,15 @@
1
+ flatline redistribution notice
2
+
3
+ flatline itself is licensed under Apache-2.0. See LICENSE.
4
+
5
+ This package compiles and links against the Ghidra decompiler engine. The
6
+ decompiler source is vendored under third_party/ghidra as a git submodule
7
+ from the NSA/ghidra repository. The upstream Ghidra project is licensed
8
+ under Apache-2.0; see third_party/ghidra/LICENSE and third_party/ghidra/NOTICE
9
+ for upstream attribution.
10
+
11
+ Default runtime data is provided by the separate ghidra-sleigh dependency.
12
+
13
+ Test-fixture redistribution note: tests/fixtures/README.md documents that the
14
+ committed fixture bytes are synthetic machine code authored in-repo and are
15
+ redistributable.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: flatline
3
+ Version: 0.1.1
4
+ Summary: Python wrapper around the Ghidra decompiler
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Requires-Python: >=3.13
9
+ Requires-Dist: ghidra-sleigh
10
+ Provides-Extra: test
11
+ Requires-Dist: pytest>=8.0; extra == "test"
12
+ Requires-Dist: PyYAML>=6.0; extra == "test"
13
+ Provides-Extra: lint
14
+ Requires-Dist: ruff>=0.9; extra == "lint"
15
+ Provides-Extra: docs
16
+ Requires-Dist: mkdocs-material>=9.0; extra == "docs"
17
+ Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
18
+ Requires-Dist: mike>=2.0; extra == "docs"
19
+ Provides-Extra: dev
20
+ Requires-Dist: flatline[lint,test]; extra == "dev"
21
+ Requires-Dist: build>=1.2; extra == "dev"
22
+ Requires-Dist: tox>=4.0; extra == "dev"
23
+
@@ -0,0 +1,215 @@
1
+ # flatline
2
+
3
+ Python wrapper around the Ghidra decompiler. Provides a stable, pip-installable
4
+ interface for single-function decompilation with structured output -- no Ghidra
5
+ installation required.
6
+
7
+ Named after Dixie Flatline from William Gibson's *Neuromancer* (1984) -- a dead
8
+ hacker's ROM construct, a consciousness extracted from hardware. A fitting
9
+ metaphor for decompilation: extracting meaning from dead code.
10
+
11
+ ## Features
12
+
13
+ - **Single-function decompilation** -- pass a memory image, base address, and
14
+ function entry point; get back structured C output with diagnostics.
15
+ - **Multi-ISA** -- supports any Ghidra-supported target architecture. Priority
16
+ fixture-backed confidence for x86 (32/64), ARM64, RISC-V 64, and MIPS32;
17
+ other bundled ISAs remain best-effort.
18
+ - **Packaged runtime data** -- compiled Sleigh runtime assets come from the
19
+ companion `ghidra-sleigh` package, so production installs do not depend on a
20
+ vendored `third_party/ghidra` tree.
21
+ - **Deterministic** -- repeated decompiles of the same input produce
22
+ structurally equivalent output.
23
+
24
+ ## Requirements
25
+
26
+ - Python 3.13+
27
+ - Supported runtime host contract: Linux x86_64, macOS arm64, Windows x86_64
28
+ - Published wheels: Linux x86_64/aarch64, Windows x86_64, macOS x86_64/arm64
29
+
30
+ Building from source (platforms without pre-built wheels, or forced native
31
+ builds) requires a C++20 compiler, Ninja, and zlib headers:
32
+
33
+ | Platform | Install command |
34
+ |----------|----------------|
35
+ | Ubuntu/Debian | `sudo apt-get install g++ ninja-build zlib1g-dev` |
36
+ | Fedora/RHEL | `sudo dnf install gcc-c++ ninja-build zlib-devel` |
37
+ | macOS | `brew install ninja zlib` (Xcode provides the C++ compiler) |
38
+ | Windows | Visual Studio with C++ workload; `pip install ninja`; `vcpkg install zlib:x64-windows` |
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ pip install flatline
44
+ ```
45
+
46
+ `pip install flatline` uses pre-built wheels on Linux x86_64/aarch64, Windows
47
+ x86_64, and macOS x86_64/arm64, so those installs work without a local
48
+ compiler. The supported runtime-host contract currently covers Linux x86_64,
49
+ macOS arm64, and Windows x86_64. Linux aarch64 and macOS x86_64 remain
50
+ published-wheel targets until they gain dedicated equivalent-contract lanes.
51
+ Platforms outside that wheel matrix fall back to source builds and therefore
52
+ need a C++20 compiler plus Ninja.
53
+
54
+ For development:
55
+
56
+ ```bash
57
+ python -m venv .venv
58
+ source .venv/bin/activate
59
+ pip install -e ".[dev]"
60
+ ```
61
+
62
+ `flatline` depends on `ghidra-sleigh` for its default runtime-data path, so
63
+ `DecompilerSession` and the one-shot wrappers auto-discover runtime data when
64
+ `runtime_data_dir` is omitted. `runtime_data_dir` remains available as an
65
+ explicit override for custom or reduced runtime-data roots.
66
+
67
+ ### Native bridge
68
+
69
+ Real decompilation requires the native bridge -- a compiled C++ extension
70
+ (`flatline._flatline_native`) that links against the Ghidra decompiler library.
71
+ Without it the Python API is fully importable, but every `decompile_function`
72
+ call returns a `configuration_error` result. `list_language_compilers` still
73
+ returns runtime-data pairs discovered from the installed `ghidra-sleigh`
74
+ package.
75
+
76
+ The build has three modes, controlled by the `native_bridge` Meson option:
77
+
78
+ | Mode | How to set | Behaviour |
79
+ |------|------------|-----------|
80
+ | `auto` (default) | omit the flag | Builds the extension when a C++20 compiler and Ninja are found; silently falls back to the pure-Python stub otherwise. |
81
+ | `enabled` | `-Dnative_bridge=enabled` | Forces the native build; fails at install time if prerequisites are missing. Use this to validate the full decompilation stack. |
82
+ | `disabled` | `-Dnative_bridge=disabled` | Skips the native build entirely. All decompilation calls return `configuration_error`. |
83
+
84
+ Force the native build explicitly (requires a C++20 compiler and Ninja):
85
+
86
+ ```bash
87
+ pip install -e ".[dev]" -Csetup-args=-Dnative_bridge=enabled
88
+ ```
89
+
90
+ Disable the native build explicitly (pure-Python stub only):
91
+
92
+ ```bash
93
+ pip install -e ".[dev]" -Csetup-args=-Dnative_bridge=disabled
94
+ ```
95
+
96
+ Tests that require the native extension are marked `requires_native` and
97
+ auto-skip with an actionable reason when `flatline._flatline_native` is not
98
+ importable.
99
+
100
+ ## Quick start
101
+
102
+ ```python
103
+ from flatline import DecompileRequest, decompile_function
104
+
105
+ result = decompile_function(DecompileRequest(
106
+ memory_image=raw_bytes,
107
+ base_address=0x400000,
108
+ function_address=0x401000,
109
+ language_id="x86:LE:64:default",
110
+ compiler_spec="gcc",
111
+ ))
112
+
113
+ print(result.c_code)
114
+ ```
115
+
116
+ Pass `runtime_data_dir=...` only when you need to override the dependency-backed
117
+ default runtime-data root.
118
+
119
+ ## Development
120
+
121
+ ```bash
122
+ # Activate the venv (required for all commands)
123
+ source .venv/bin/activate
124
+
125
+ # Run tests + lint across configured environments
126
+ tox
127
+
128
+ # Run lint only
129
+ tox -e lint
130
+
131
+ # Run unit tests only
132
+ tox -e py313,py314 -- -m unit
133
+
134
+ # Run native-dependent tests (skipped automatically when the extension is absent)
135
+ tox -e py313,py314 -- -m requires_native
136
+ ```
137
+
138
+ `tox` test envs build and install `flatline[test]` wheels inside `.tox/`, so
139
+ the suite exercises the packaged artifact rather than `PYTHONPATH=src`.
140
+ Repo-only release and diagnostic helpers live under `tools/` and are
141
+ intentionally absent from wheel and sdist artifacts.
142
+
143
+ ## Documentation
144
+
145
+ Install the docs dependencies:
146
+
147
+ ```bash
148
+ pip install -e ".[docs]"
149
+ ```
150
+
151
+ **Local preview:**
152
+
153
+ ```bash
154
+ PYTHONPATH=src mkdocs serve
155
+ ```
156
+
157
+ Then open http://127.0.0.1:8000.
158
+
159
+ **Build static site:**
160
+
161
+ ```bash
162
+ PYTHONPATH=src mkdocs build
163
+ ```
164
+
165
+ Output goes to `site/`.
166
+
167
+ `PYTHONPATH=src` lets mkdocstrings import the pure-Python modules for API
168
+ reference generation without requiring a native build.
169
+
170
+ ## Release Notes
171
+
172
+ Project history lives in [CHANGELOG.md](CHANGELOG.md). Update it for every
173
+ release using the Keep a Changelog structure already in the file.
174
+ The release-facing contract guarantees, support tiers, known-variant limits,
175
+ and upgrade policy for the public `0.1.x` line live in
176
+ [docs/release_notes.md](docs/release_notes.md).
177
+ The public artifact review checklist and manual approval hold point live in
178
+ [docs/release_review.md](docs/release_review.md).
179
+ The current production release workflow and the active `.devN` to public-version
180
+ recommendation live in [docs/release_workflow.md](docs/release_workflow.md).
181
+ GitHub Actions release publishing lives in
182
+ [.github/workflows/release.yml](.github/workflows/release.yml): published
183
+ GitHub releases go to PyPI, while manual dispatch uploads to TestPyPI.
184
+ Manual TestPyPI dispatches require a unique version and now fail on duplicate
185
+ uploads instead of reusing an older TestPyPI artifact.
186
+ Redistribution/compliance guidance lives in [NOTICE](NOTICE) and
187
+ [docs/compliance.md](docs/compliance.md). The current default-install footprint
188
+ baseline and size-policy note live in [docs/footprint.md](docs/footprint.md).
189
+ The current P6 host-expansion feasibility record lives in
190
+ [docs/host_feasibility.md](docs/host_feasibility.md).
191
+
192
+ ## Project status
193
+
194
+ The `0.1.0` MVP release is available. P5 initial public release is complete,
195
+ with release-facing guarantees and support-policy notes captured in
196
+ [docs/release_notes.md](docs/release_notes.md). The current production publish
197
+ workflow for the staged `0.1.1` release is recorded in
198
+ [docs/release_workflow.md](docs/release_workflow.md), and the human approval
199
+ gate remains documented in [docs/release_review.md](docs/release_review.md).
200
+ P6 host-feasibility work now promotes macOS arm64 and Windows x86_64 alongside
201
+ Linux x86_64 in the supported runtime-host tier. The remaining P6.5 step is
202
+ the first production PyPI publish of the Tier-1 wheel set. `python tools/release.py`
203
+ audits the current release candidate, while
204
+ [docs/wheel_matrix.md](docs/wheel_matrix.md),
205
+ [docs/host_feasibility.md](docs/host_feasibility.md), and
206
+ [docs/roadmap.md](docs/roadmap.md) remain the source-of-truth phase documents.
207
+
208
+ ## Acknowledgments
209
+
210
+ This project was developed with the support of [Quarkslab](https://github.com/quarkslab).
211
+
212
+ ## License
213
+
214
+ Apache-2.0. See [LICENSE](LICENSE) for the project license and [NOTICE](NOTICE)
215
+ for redistribution-time attribution.