ethteck / splat

A binary splitting tool to assist with decompilation and modding projects
MIT License
170 stars 43 forks source link

Add `matchings_path` option to be used alongside `disassemble_all` #374

Closed Drahsid closed 5 months ago

Drahsid commented 5 months ago

I found that disassemble_all was a great addition that made it pretty easy to quickly use or analyze the original assembly of an already matched function. That said, it splits the assembly for matching functions to the nonmatching path. While this isn't a big deal, I do think it is a determent to organization, and may possibly conflict with some makefiles or progress scripts which blindly scan the nonmatching folder. This PR adds an option that works alongside disassemble_all, where if a function is a global asm func, and if disassemble_all is true, it will be split to the directory pointed to by a new variable matchings_path. I set the default value of this variable to matchings. Besides being a solution to the problems I listed earlier, this might also have the benefit of giving the user more options to determine matching progress, and maybe more stuff I haven't considered.

Drahsid commented 5 months ago

I OK'd the unit test by adding an empty matchings directory in the expected build directory, and ignoring the .gitkeep file in the directory comparison. Might be more ideal to add a matching function in the split, though

ethteck commented 5 months ago

it looks like there's some formatting issues. could you try running black locally to fix those? if that doesn't work, it might be due to a version mismatch..

Drahsid commented 5 months ago

Looks like it's still failing. The version of black I have seems to be black-24.4.2

Drahsid commented 5 months ago

wait I just forgot test.py my bad

AngheloAlf commented 5 months ago

Could you mention this new option in the changelog?