binrec-tob icon indicating copy to clipboard operation
binrec-tob copied to clipboard

Meta: Code maintainability improvements

Open michaelbrownuc opened this issue 3 years ago • 3 comments

There is much room for improvement to the code quality of the C++ components in BinRec and the plugins. Stopping short of a complete refactor / rewrite, there is a lot we can do to make the code more readable and decipherable for new engineers coming on to the project.

This is a catchall issue we commit / merge PRs against to capture the various little improvements we make along the way. Ideally, when exploring parts of the code base as parts of other issues, we can commit /merge localized cleanup and maintainability changes towards this issue to keep our other PRs simple to review.

Commits and PRs against this issue should have zero to no impact on program behavior to allow for rapid review and merging. This includes changes like adding comments, cleaning up comments, single line code clarity changes that do not change program behavior, code formatting, etc.

Actionable tasks can be added as comments for cleanup.

michaelbrownuc avatar Mar 31 '22 18:03 michaelbrownuc

Unify all checks for Func_* in binrec_lift to use isLiftedFunction

michaelbrownuc avatar Mar 31 '22 18:03 michaelbrownuc

Add descriptive error messages to assertions to convey what is actually happening or failing.

ameily avatar May 16 '22 18:05 ameily

Replace asserts in the binrec plugins with exceptions thrown in the same manner as the work Adam did on the Binrec lifting components.

michaelbrownuc avatar May 18 '22 13:05 michaelbrownuc