Add a script to detect function overlaps in the CSV

Helps identify and fix function sizes in the function CSV
This commit is contained in:
Léo Lam 2022-12-04 11:55:57 +01:00
parent 965b45426c
commit 8dbd0d7839
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
from common.util import utils
prev = None
for info in utils.get_functions():
if prev is not None:
if (prev.addr <= info.addr < prev.addr + prev.size) or \
(prev.addr <= info.addr + info.size < prev.addr + prev.size):
print(
f"overlap between {prev.addr:x} and {info.addr:x} (expected size: {info.addr - prev.addr:06})")
prev = info