Match vtables with virtual inheritance (#717)

* Match vtables with virtual inheritance

* Simplify vtable name check

* Thunk alert
This commit is contained in:
MS
2024-03-23 18:01:40 -04:00
committed by GitHub
parent b279e8b8b9
commit 3f03940fcb
11 changed files with 350 additions and 24 deletions

View File

@@ -89,6 +89,21 @@ def main():
print_summary(vtable_count, problem_count)
# Now compare adjuster thunk functions, if there are any.
# These matches are generated by the compare engine.
# They should always match 100%. If not, there is a problem
# with the inheritance or an overriden function.
for fun_match in engine.get_functions():
if "`vtordisp" not in fun_match.name:
continue
diff = engine.compare_address(fun_match.orig_addr)
if diff.ratio < 1.0:
problem_count += 1
print(
f"Problem with adjuster thunk {fun_match.name} (0x{fun_match.orig_addr:x} / 0x{fun_match.recomp_addr:x})"
)
return 1 if problem_count > 0 else 0