beehive-lab / mambo

A low-overhead dynamic binary instrumentation and modification tool for ARM (both AArch32 and AArch64 support) and RISC-V (RV64GC).
Apache License 2.0
323 stars 69 forks source link

Remove reduntant code #68

Closed GuillermoCallaghan closed 2 years ago

GuillermoCallaghan commented 2 years ago

This PR is based on #67, so it is open as Draft until that PR is merged. There is a conflict because both #67 and this PR modify dispatcher.c. Removes unused lines of code, commented code and redundant #includes.

Closes #67

GuillermoCallaghan commented 2 years ago

..., I don't think we should remove include headers like that even if they're already included by another header. If at least one function or structure declared in a header is used in the file, leave it in. Or alternatively we could ensure any needed MAMBO headers are included in dbm.h and remove all other local includes.

My idea here was to first remove the redundant #includes. And then look at the common files that need to be included and add them to dbm.h.